summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2009-04-28 11:44:55 +0000
committerMarko Kreen2009-04-28 12:03:03 +0000
commit88a3cfcbd56d304fc8155f6e87fcada7f3acfe5b (patch)
tree4d73a694448509b2e7c86025b1b5596ceecf01e4
parent9d0c8fe0bc7e62205219470b8f91cc0097085f72 (diff)
doc/devnotes: describe git usage more
-rw-r--r--doc/devnotes.txt45
1 files changed, 44 insertions, 1 deletions
diff --git a/doc/devnotes.txt b/doc/devnotes.txt
index 0a5f73bc..5dd1954c 100644
--- a/doc/devnotes.txt
+++ b/doc/devnotes.txt
@@ -64,7 +64,7 @@ submodule update should be done:
=== Repos ===
Master Skytools repository: `git://github.com/markokr/skytools-dev.git`
-Master libusual repository: `git://github.com/markokr/libusual.git`
+Master libusual repository: `git://github.com/markokr/libusual.git
Currently known developer repos are on github.com:
@@ -135,3 +135,46 @@ requires the completion script from above:
PS1='\h:\w$(__git_ps1 " (%s)")\$ '
+==== Cloning dev repo ====
+
+ ## clone master repo
+ $ git clone git://github.com/markokr/skytools-dev.git
+ $ cd skytools-dev
+
+ ## add your own writable repo, named 'self'
+ $ git remote add self [email protected]:${username}/skytools-dev.git
+
+ ## fetch changes in master repo
+ $ git fetch origin
+ ## see changes in master repo
+ $ git log [-p] origin/master
+ ## merge changes from master repo
+ $ git merge origin/master
+ ## do fetch+merge in one go
+ $ git pull origin . ## ???
+
+ ## commit a change, push to your repo (on 'master' branch)
+ $ edit oldfile
+ $ edit newfile
+ $ git add newfile
+ $ git commit -a -m '..'
+ $ git push self master
+
+ ## create a branch for your changes, starting from checked out branch
+ $ git branch mybranch
+ $ git checkout mybranch
+ ## or, in one command
+ $ git checkout -b mybranch
+
+ ## commit files
+ $ edit oldfile
+ $ edit newfile
+ $ git add newfile
+ $ git commit -a -m 'commit summary'
+ ## optional: merge, or update commits relative to master branch
+ $ git rebase -i master
+ ## merge into master and push master
+ $ git checkout master
+ $ git merge mybranch
+ $ git push self master
+