Skip to content

Commit

Permalink
More stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tquilkey committed Jul 6, 2011
1 parent 3f4d722 commit 65653d9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 19 deletions.
1 change: 1 addition & 0 deletions GitStuff.wiki
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CloneAllBranches
ModernizeYourGitWorkflow
GoodLinks

Amend the last commit. You can add files, edit the cmmit message, whatever.
$ git commit --amend
Expand Down
38 changes: 19 additions & 19 deletions GitSvn.wiki
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
My new workflow is now as follows:
My git-svn workflow is now as follows:

I have a "master" branch that is the only branch that I dcommit from and that
clone the SVN repository (-s assume you have a standard SVN layout in the
repository trunk/, branches/, and tags/):

__git svn clone [-s] <svn-url>__
git svn clone [-s] <svn-url>

I work on a local branch "work" (-b creates the branch "work")

__git checkout -b work__
git checkout -b work

commit locally into the "work" branch (-s to sign-off your commit message). In
the sequel, I assume you made 3 local commits

...
__(work)$> git commit -s -m "msg 1"__
(work)$> git commit -s -m "msg 1"
...
__(work)$> git commit -s -m "msg 2"__
(work)$> git commit -s -m "msg 2"
...
__(work)$> git commit -s -m "msg 3"__
(work)$> git commit -s -m "msg 3"

Now you want to commit onto the SVN server

[Eventually] stash the modifications you don't want to see committed on the SVN
server (often you commented some code in the main file just because you want to
accelerate the compilation and focus on a given feature)

__(work)$> git stash__
(work)$> git stash

rebase the master branch with the SVN repository (to update from the SVN server)

__(work)$> git checkout master__
__(master)$> git svn rebase__
(work)$> git checkout master
(master)$> git svn rebase

go back to the work branch and rebase with master

__(master)$> git checkout work__
__(work)$> git rebase master__
(master)$> git checkout work
(work)$> git rebase master

Ensure everything is fine using, for instance:

__(work)$> git log --graph --oneline --decorate__
(work)$> git log --graph --oneline --decorate

Now it's time to merge all three commits from the "work" branch into "master"
using this wonderful --no-ff option

__(work)$> git checkout master__
__(master)$> git merge --no-ff work__
(work)$> git checkout master
(master)$> git merge --no-ff work

You can notice the status of the logs:

__(master)$> git log --graph --oneline --decorate__
(master)$> git log --graph --oneline --decorate

* 56a779b (work, master) Merge branch 'work'
|\
Expand All @@ -64,13 +64,13 @@ Now you probably want to edit (amend) the last commit for your SVN dudes
(otherwise they will only see a single commit with the message "Merge branch
'work'"

__(master)$> git commit --amend__
(master)$> git commit --amend

Finally commit on the SVN server

__(master)$> git svn dcommit__
(master)$> git svn dcommit

Go back to work and eventually recover your stashed files:

__(master)$> git checkout work__
__(work)$> git stash pop__
(master)$> git checkout work
(work)$> git stash pop
1 change: 1 addition & 0 deletions GoodLinks.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://linux.yyz.us/git-howto.html
17 changes: 17 additions & 0 deletions Vim Tips.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,20 @@
[[Using Markers]]
[[PHP Manual]]
[[New Entry]]

Vim folding commands

zf#j creates a fold from the cursor down # lines.
zf/string creates a fold from the cursor to string .
zj moves the cursor to the next fold.
zk moves the cursor to the previous fold.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zm increases the foldlevel by one.
zM closes all open folds.
zr decreases the foldlevel by one.
zR decreases the foldlevel to zero -- all folds will be open.
zd deletes the fold at the cursor.
zE deletes all folds.
[z move to start of open fold.
]z move to end of open fold.
2 changes: 2 additions & 0 deletions WorkStuff.wiki
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DbTransaction

timeview /www/ajax/searchStudents.gpx

0 comments on commit 65653d9

Please sign in to comment.