User Tools

Site Tools


kurs:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
kurs:git [2012/01/10 11:10]
mh
kurs:git [2012/09/25 17:22]
127.0.0.1 external edit
Line 7: Line 7:
 git checkout abcde file/​to/​restore git checkout abcde file/​to/​restore
  
-==== Alle - auch remote - branches anzeigen (geht logischerweise erst nach einem pull) =====+==== Alle - auch remote - branches anzeigen (geht logischerweise erst nach einem pull) ====
  
 ''>​ git branch -a''​ ''>​ git branch -a''​
Line 34: Line 34:
  
  
 +==== Mergen ====
 +
 +Problem: wenn zwischen einem pull --rebase auf lokalem repo A "​etwas"​ widersprüchliches zu einem push von lokalem repo B passiert
 +
 +<​code>​
 +>git pull --rebase
 +remote: Counting objects: 5, done.
 +remote: Compressing objects: 100% (1/1), done.
 +remote: Total 3 (delta 1), reused 3 (delta 1)
 +Unpacking objects: 100% (3/3), done.
 +From github.com:​MarkHofstetter/​kurs-employee
 +   ​0d61041..2ae5a03 ​ Mark       -> origin/Mark
 +First, rewinding head to replay your work on top of it...
 +Applying: changed d to 300
 +Using index info to reconstruct a base tree...
 +Falling back to patching base and 3-way merge...
 +Auto-merging git_test.txt
 +CONFLICT (content): Merge conflict in git_test.txt
 +Failed to merge in the changes.
 +Patch failed at 0001 changed d to 300
 +
 +When you have resolved this problem run "git rebase --continue"​.
 +If you would prefer to skip this patch, instead run "git rebase --skip"​.
 +To restore the original branch and stop rebasing run "git rebase --abort"​.
 +</​code>​
 +
 +Manuelles reparieren der Konflikte
 +
 +>git add git_test.txt
 +
 +>git commit -m "​treffen in der Mitte d = 250"
 +[detached HEAD e1ddd18] treffen in der Mitte d = 250
 + 1 files changed, 2 insertions(+),​ 2 deletions(-)
 +
 +>git rebase --continue
 +Applying: changed d to 300
 +No changes - did you forget to use 'git add'?
 +
 +When you have resolved this problem run "git rebase --continue"​.
 +If you would prefer to skip this patch, instead run "git rebase --skip"​.
 +To restore the original branch and stop rebasing run "git rebase --abort"​.
 +
 +
 +>git rebase --skip
 +HEAD is now at e1ddd18 treffen in der Mitte d = 250
 +Nothing to do.
 +
 +>git push
  
  
kurs/git.txt · Last modified: 2014/09/10 21:22 (external edit)