git-stage

What's the difference between Git add (ctrl+A) and Stage to Commit (ctrl+T) in the git GUI?

If git add CTRL + A starts tracking changes AND stages changes to already tracked files, why should I ever use Stage to Commit CTRL + T in the git gui ? user1271772 Here's the answer to my question: CTRL + A in the GIT GUI is actually to ADD A NEW REMOTE and is not the same as GIT ADD ! In the GIT...

Differences between the staged and unstaged versions of the same file, using difftool [duplicate]

This question already has answers here : Show both staged & working tree in git diff? (3 answers) Is there a way of viewing the differences between the staged and unstaged versions of the same file? For example: Changes to be committed: modified: conf/application.conf Changes not staged for commit:...

Git: need to recursively 'git rm' the contents of all bin and obj folders

Someone by accident just commited all of their bin and obj folders to our repo (there are around 40 such folders). I would like to do a git rm -r on all of these folders. Is there a command to do this? Have backups, find . -type d -name bin -exec git rm -r {} \; find . -type d -name obj -exec git rm...

Why does checkout sometimes stage a file?

When I first started using Git, I found the checkout command quite confusing. However, as I adapted to Git's model of version control, it started to make sense. Now I am having to teach Git to my coworkers, and I'm trying to explain checkout simply. I thought I had a simple explanation (from the...

Git: list only “untracked” files (also, custom commands)

Is there a way to use a command like git ls-files to show only untracked files? The reason I'm asking is because I use the following command to process all deleted files: git ls-files -d | xargs git rm I'd like something similar for untracked files: git some-command --some-options | xargs git add I...