-
-
Save henrik/518a6db9f3671fba6f72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git-tips från SHRUG-presentation 2010-02-24: | |
- git reset --soft HEAD^ | |
För undo, som stash. | |
http://henrik.nyh.se/2009/02/git-reset-soft-as-stash-replacement-and-undo | |
- git reflog | |
Om man råkat ta bort en branch. Om man rebaseat en branch eller kört reset --hard. | |
git reflog --all, git log --walk-reflogs | |
- git checkout - | |
Som "cd -". Bra att ha i ett alias. T.ex. växla mellan master och feature. | |
Sedan 1.6.2. Tidigare: git checkout @{-1} | |
- git checkout --ours/--theirs foo.txt | |
För att vid en merge välja att behålla foo.txt från denna branch (--ours) eller den inmergeade (--theirs). | |
Sedan 1.6.1. Tidigare: git checkout MERGE_HEAD -- foo.txt | |
Sedan 1.6.1. Tidigare: git checkout ORIG_HEAD -- foo.txt | |
- git bisect | |
git bisect start HEAD master | |
git bisect run ruby test.rb | |
- branch och dirty i shell prompt: http://henrik.nyh.se/2008/12/git-dirty-prompt | |
- auto-reference tickets from branch name: http://henrik.nyh.se/2009/09/git-hook-to-auto-reference-tickets-from-the-branchname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment