Git Untrack Already Tracked Files
To remove files that are currently being tracked by git, you have to remove them from the "cache". Note, doing this will NOT delete the file on your local machine. It will still be there but not be tracked.
git rm -r --cached supersecretpasswords.txt
How to Remove Your Last Git Commit
Remove your last commit (if you haven't pushed yet)
git reset --hard HEAD~1
To see changes that have been committed and their position in HEAD
And to undo your previous reset and advance the cursor to the reference immediately behind the cu...
Working with Branches in Git
Show all the branches
Create a new branch
git branch my_experimental_feature
Use that branch
git checkout my_experimental_feature
Pushing the new branch to a remote server
git push origin my_experimental_feature
Pulling that branch down...
git checkout -- file-in-question.oh-my
Problem: using git and one file, like your db/schema.rb, is out of whack with the latest branch. If you run git pull and you get a failed merge and no update. You can of course, edit the conflicts manually. But what if you're confident that the latest sch...
the simple things with git
Git can track the file permissions on your source. This can be good, but for small projects on a webserver where permissions change from time to time, and permissions on development app don't match or matter anyway, it's often easier to just skip this che...