Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:git

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
becki:linux:git [2015-05-27 14:14]
becki
becki:linux:git [2025-01-08 10:11] (aktuell)
becki
Zeile 11: Zeile 11:
 ===== Mercurial Command Comparison ​ == ===== Mercurial Command Comparison ​ ==
  
 +See https://​www.rath.org/​mercurial-for-git-users-and-vice-versa.html to understand the different concepts
 See [[hg>​wiki/​GitConcepts|Mercurial <=> Git Command comparison]] See [[hg>​wiki/​GitConcepts|Mercurial <=> Git Command comparison]]
  
 ^ hg ^ git ^ comment ^ ^ hg ^ git ^ comment ^
 +| hg backout | git revert | options my differ |
 | hg branches | git branch [-a] | | | hg branches | git branch [-a] | |
-| hg  commit -m '​msg'​ | git commit -a -m '​msg'​ | from trial / alternative:​ ''​git add ...; git commit''​ |+| hg commit -m '​msg'​ | git commit -a -m '​msg'​ | from trial / alternative:​ ''​git add ...; git commit'' ​
 +| hg diff -c -1 | ''​git diff @{0}^!''​ or ''​git show @{0}''​ | See diffs of last commit (tip) | 
 +| hg diff -c -2 | ''​git diff @{1}^!''​ or ''​git show @{1}''​ | See diffs of penultimate commit ​|
 | hg glog | git log --graph | | | hg glog | git log --graph | |
 | hg glog -v | git log --name-only | | | hg glog -v | git log --name-only | |
 | hg init | git init | from trial | | hg init | git init | from trial |
 | hg pull -u | git pull [url] | URL may be specified, otherwise remot tracking thing is used? | | hg pull -u | git pull [url] | URL may be specified, otherwise remot tracking thing is used? |
-| hg push -r | git push | FIXME did not work without ''​-r''​ / To be investigated ​|+| hg push | git push | See below |
 | hg status; hg outgoing | git status | | | hg status; hg outgoing | git status | |
 | hg uptdate ... | git checkout ... | | | hg uptdate ... | git checkout ... | |
 +
 +===== Push ==
 +
 +In order to push from repo S to reop T, T must not be on the branch you want to push to (typically master). Therefore create a dummy branch ''​git checkout -b dummy''​ on T. Now you can push to T/master from S
 +
 +Alternatively you can turn T into a "​bare"​ repo.
 +
 +See also http://​stackoverflow.com/​questions/​2816369
  
 ===== Clone == ===== Clone ==
becki/linux/git.1432736043.txt.gz · Zuletzt geändert: 2015-05-27 14:14 von becki

Impressum - Datenschutzerklärung