Skip to content

Instantly share code, notes, and snippets.

@MikeLarned
Created January 24, 2012 05:00
Show Gist options
  • Save MikeLarned/1668002 to your computer and use it in GitHub Desktop.
Save MikeLarned/1668002 to your computer and use it in GitHub Desktop.
--reset after .gitignore change
git rm -r --cached .
git add .
git commit -a -m "M"
--prune remote
git fetch -p
--branch delete safe (ensures changes branch b are already in the current branch)
git branch -d
--branch force delete
git branch -D (force delete)
--pretty log
--add remote
git remote add origin "URI"
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
--list merge conflicts
git ls-files -u | cut -f 2 | sort -u
--show origin tracking branches
git remote show origin
--
git branch --set-upstream foo upstream/foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment