Skip to content

Instantly share code, notes, and snippets.

@abernier
Created September 20, 2010 09:58
Show Gist options
  • Save abernier/587678 to your computer and use it in GitHub Desktop.
Save abernier/587678 to your computer and use it in GitHub Desktop.
// Recursive submodule init update
git submodule foreach --recursive 'git submodule init && git submodule update'
// Push de la branche locale 'machin' vers la branche distante 'chose'
git push origin/machin:chose
// Renommer une branche
git branch -m <nouveau-nom>
// Stashing for later
git stash save "Keep it for later"
git stash list
git stash apply stash@{3}
// copier un commit dans la branche locale
git cherry-pick <le-hash-du-commit-que-l-on-souhaite-copier>
// Ré-organiser des commits
git rebase -i <le-hash-du-commit-juste-avant-lequel-on-souhaite-réorganiser>
(git rebase --abort)
// Delete last commit:
git reset --hard HEAD~1
// If it's already pushed:
git revert HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment