Over the last four years I have become very familiar and comfortable with git. I have realized several of my friends and colleagues are not fans of it, so I have compiled a list of common commands.


git add -u

The -u option will stage all modified files.

git push origin :”branch”

Delete a branch from origin

git commit --amend

Rewrite history of the last commit and add The Current staged files to the last commit.

git submodule foreach “git command”

This will go through each of the submodules and run the given command. Useful for a git checkout or a git clean/reset

git log --name-only

Show the log along with the name of all files.

No comments

You today

Comments are closed

Published: August 09 2016

  • tags: