git clone git://github.com/mischat/Test.git
melgo:Test mmt$ git status # On branch master # Changes not staged for commit: # (use "git add..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # # modified: README # no changes added to commit (use "git add" and/or "git commit -a")
melgo:Test mmt$ git diff diff --git a/README b/README index ebf366d..9e658d9 100644 --- a/README +++ b/README @@ -1 +1 @@ -Hello World :) +Hello PeerIndex :)
melgo:Test mmt$ git add README melgo:Test mmt$ git status # On branch master # Changes to be committed: # (use "git reset HEAD..." to unstage) # # modified: README #
# Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD..." to unstage) # # modified: README #
melgo:Test mmt$ git push git lCounting objects: 5, done. Writing objects: 100% (3/3), 279 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To [email protected]:mischat/Test.git efe088f..2017619 master -> master
melgo:Test mmt$ git log commit 20176197627ef2a9f5f9ee304b04f218c6b8d8a0 Author: Mischa TuffieldDate: Fri Feb 17 13:55:45 2012 +0000 Was asked to say hello to PeerIndex commit efe088f34adc029da74dd72e9e0625d64251dab4 Author: Mischa Tuffield Date: Fri Feb 17 13:46:21 2012 +0000 Initial Commit to the Repo
melgo:Test mmt$ git show 20176197627ef2a9f5f9ee304b04f218c6b8d8a0 commit 20176197627ef2a9f5f9ee304b04f218c6b8d8a0 Author: Mischa TuffieldDate: Fri Feb 17 13:55:45 2012 +0000 Was asked to say hello to PeerIndex diff --git a/README b/README index ebf366d..9e658d9 100644 --- a/README +++ b/README @@ -1 +1 @@ -Hello World :) +Hello PeerIndex :)
6a998f24 (Alister Bulman 2011-09-13 13:56:35 +0000 33) role :app, "api.viewsflow.com", "api3.viewsflow.com" ^b688b4a ([email protected] 2011-06-06 10:29:44 +0000 34) b6c800d5 ([email protected] 2011-07-01 17:24:17 +0000 35) # adding other known process servers as they come ^b688b4a ([email protected] 2011-06-06 10:29:44 +0000 36) # this is so we can # cap deploy, > with process !deploy 16ba0bdc ([email protected] 2011-06-23 14:51:48 +0000 37) # process1 aka process(4/9) 16ba0bdc ([email protected] 2011-06-23 14:51:48 +0000 38) # process2 aka process(2/8) 6a998f24 (Alister Bulman 2011-09-13 13:56:35 +0000 39) #role :process, "process.viewsflow.com", "process2.viewsflow.com" b6c800d5 ([email protected] 2011-07-01 17:24:17 +0000 40) ^b688b4a ([email protected] 2011-06-06 10:29:44 +0000 41) # 46.51.130.109 worker, larry ^b688b4a ([email protected] 2011-06-06 10:29:44 +0000 42) # 79.125.64.99 worker, scruffy ^b688b4a ([email protected] 2011-06-06 10:29:44 +0000 43) # 46.137.54.254 worker, panucci b6c800d5 ([email protected] 2011-07-01 17:24:17 +0000 44) # 79.125.88.69 worker, calculon b6c800d5 ([email protected] 2011-07-01 17:24:17 +0000 45) # 46.137.133.93 worker, crushinator
Demo :)
A-----C----E ("stable")
\
B-----D-----F ("new-idea")
So the commits A, C and E are on "stable" and A, B, D and F are on "new-idea". If you then merge "new-idea" onto "stable" with the following commands
i
git checkout stable # Change to work on the branch "stable"
git merge new-idea # Merge in "new-idea"
A-----C----E----G ("stable")
\ /
B-----D-----F ("new-idea")
A-----C----E----G ("stable")
\ /
B-----D-----F ("new-idea")
last version from another repository
|
v
M---N-----O----P---Q ("master")
git branch dubious-experiment
M---N-----O----P---Q ("master" and "dubious-experiment")
git checkout master
# Be careful with this next command: make sure "git status" is
# clean, you're definitely on "master" and the
# "dubious-experiment" branch has the commits you were working
# on first...
git reset --hard [SHA1sum of commit N]
("master")
M---N-------------O----P---Q ("dubious-experiment")
This reverts the master branch ignoring the dubious experiment
melgo:4store-mischat mmt$ git branch
4storemaster
* master
melgo:4store-mischat mmt$ git branch -a
4storemaster
* master
remotes/4storemaster/delete
remotes/4storemaster/gh-pages
remotes/4storemaster/master
remotes/4storemaster/narrowdistinct
remotes/4storemaster/plaintext
remotes/4storemaster/prefixes
remotes/4storemaster/raptor1
remotes/4storemaster/raptor2
remotes/origin/HEAD -> origin/master
remotes/origin/delete
remotes/origin/gh-pages
remotes/origin/master
remotes/origin/narrowdistinct
remotes/origin/plaintext
remotes/origin/prefixes
remotes/origin/raptor1
remotes/origin/raptor2
remotes/rafl/delete
remotes/rafl/gh-pages
remotes/rafl/master
remotes/rafl/narrowdistinct
remotes/rafl/plaintext
remotes/rafl/prefixes
remotes/rafl/raptor1
remotes/rafl/raptor2
melgo:4store-mischat mmt$
[branch "lamebranch"]
remote = origin
merge = refs/heads/lamebranch
git cherry-pick 1d67bdbbdb4b98d142bdcce1b78cbe4d2d396afd
[alias]
up = pull --rebase[user]
name = Mischa Tuffield
email = [email protected][color]
ui = true