1) git rm --cached filename
When you want a file to stay on your local but want it to be removed from all the repositories you push to.
2) git update-index --assume-unchanged
When you want the change you did in your local files to stay but not checked into the repository when you commit.
3) git update-index --no-assume-unchanged
Start tracking the file again. The undo of 2) above.
4) .gitignore
The system will ignore all the files listed in .gitignore. But it has no effects in files that were already checked in. Use the commands in 1) or 2) above to remove the files from the index.
No comments:
Post a Comment