Site Tools


Table of Contents



Command Function
git log –follow check_symlink shows the change history of the file “check_symlink”
git remote -v verify the remote url (origin) of the current repository
git config –global “<MAIL>” configure your mail address
git config –global “<USERNAME>” configure your user name
git remote add origin<USERNAME>/<REPOSITORY>.git set a new origin for your current local repository

Remove history

#download the repository
git clone

#change into repository
cd check_symlink

#checkout to a temp branch
git checkout --orphan temp_branch

#add all files
git add -A

#commit the changes
git commit -am "Initial commit"

#delete the old branch "master"
git branch -D master

#rename the temp branch to master
git branch -m master

#copy master to remote origin
git push -f origin master
->Username for '': <USERNAME>
->Password for 'https://<USERNAME>': <PASSWORD>

linux/general/git.txt · Last modified: 2017/12/19 17:12 (external edit)