-
Notifications
You must be signed in to change notification settings - Fork 4
Git Commands
Eugene edited this page Oct 4, 2022
·
3 revisions
Stop tracking changes to "filename.txt" but do not removing it from Git
git update-index --assume-unchanged "filename.txt"
Start tracking changes to "filename.txt"
git update-index --no-assume-unchanged "filename.txt"
Disable the ability to push changes to a remote Git repository. Useful when you want to allow students to work on some software, but do not want them to push their modifications.
git remote set-url --push origin no_push
git clone --branch <branchname> <remote-repo-url>
Delete remote branches that no longer exist
git remote prune origin
Delete local branches
git branch -d <local_branch>