| 79 | |
| 80 | == git stash == |
| 81 | |
| 82 | Let's say you're working on some stuff that's not quite ready to be checked in, but you suddenly need to work on something else. You can type {{{git stash}}}, which will record the current state of your work and give you a clean working directory again. You can then make whatever changes you want to your working directory, commit them, dcommit them to SVN, and then type {{{git stash pop}}} to get what you were working on before back. You can also build a stack of stashed work by repeatedly making changes followed by {{{git stash}}} commands; you can then list these stashed modifications with {{{git stash list}}}. For full documentation on the fun of git stashing, type {{{git stash --help }}}. |
| 83 | |
| 84 | == Local Branching == |
| 85 | Another benefit of git is it's extremely easy to create a branch in your local git repository: |
| 86 | {{{ |
| 87 | git checkout master |
| 88 | git branch rt1739 |
| 89 | git checkout rt1739 |
| 90 | }}} |
| 91 | This makes a local branch off your master branch called "rt1739". You can commit changes to this branch that won't affect your master branch, and you can switch back and forth between your local branches and your master branch. In addition, each of these branches is connected to the trunk of the SVN repository, so any changes dcommitted from these branches will automagically be merged into the SVN trunk and appear in your local trunk the next time you run {{{git svn rebase}}} when you have your trunk checked out. |
| 92 | |
| 93 | Other developers may access your local branches, but in order to do so, they would need to be able to access your git repository. |
| 94 | |