Skip to content

Instantly share code, notes, and snippets.

@jan-matejka
Created August 26, 2015 16:17
Show Gist options
  • Select an option

  • Save jan-matejka/2534c4c50b39f4e76036 to your computer and use it in GitHub Desktop.

Select an option

Save jan-matejka/2534c4c50b39f4e76036 to your computer and use it in GitHub Desktop.
git diverged master workflow
yac@rainbowdash % g ci -a
[master ac6f783] Add g-auto-update repo
1 file changed, 6 insertions(+)
--------------------------------------------------------------------------------
~/data/hd/gitolite/private.git/conf git:master
yac@rainbowdash % g psh
To example.com:gitolite-admin.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'example.com:gitolite-admin.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
--------------------------------------------------------------------------------
~/data/hd/gitolite/private.git/conf git:master [1]
yac@rainbowdash % g pull --rebase
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From example.com:gitolite-admin
0566d21..12dc1ae master -> origin/master
First, rewinding head to replay your work on top of it...
Applying: Add g-auto-update repo
--------------------------------------------------------------------------------
~/data/hd/gitolite/private.git/conf git:master
yac@rainbowdash % g psh
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 379 bytes | 0 bytes/s, done.
Total 4 (delta 1), reused 0 (delta 0)
To example.com:gitolite-admin.git
12dc1ae..630a291 master -> master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment