Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:git

Dies ist eine alte Version des Dokuments!


Git Tips

Mercurial Command Comparison

See Mercurial <=> Git Command comparison

hg … git …
branches branch [-a]
glog log –graph
glog -v log –name-only
pull -u pull
uptdate … checkout …

Clone

The result of git clone <url> without specifying a branch name is dependent on which branch the source repo currently is!

Branches

git branch shows existing local branches, while git branch -r causes the „remote-tracking“ branches to be listed, and option -a shows both. See git-branch

With Git it is not possible to directly swich to a different branch on a cloned repository like in Mercurial. Instead first you have to create a new (local) branch wich „tracks“ the specified remote brach, eg. (origin/stable) and then checkout (=update) this branch to your working directory. The following command does both steps at once:

git checkout -b stable origin/stable

Now you can pull all needed updates whenever a new release is made:

git pull

See also

Cookies helfen bei der Bereitstellung von Inhalten. Diese Website verwendet Cookies. Mit der Nutzung der Website erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Computer gespeichert werden. Außerdem bestätigen Sie, dass Sie unsere Datenschutzerklärung gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
becki/linux/git.1383050902.txt.gz · Zuletzt geändert: 2013-10-29 12:48 von becki

Impressum - Datenschutzerklärung