Paling baik dijelaskan pada contoh: Saya di cabang 0,58 repositori dan ini cara saya menarik:
git pull origin 0.58
Saat saya memanggil "git pull", saya mendapatkan:
ip238:openlierox az$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.0.58.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.0.58.remote = <nickname>
branch.0.58.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.
Sepertinya saya mungkin lupa beberapa opsi (--track?) Ketika saya memeriksa cabang itu. Bagaimanapun, saya telah mengatur ini sekarang:
git config branch.0.58.merge 0.58
git config branch.0.58.remote origin
Dan ini sepertinya berhasil. Kemudian, hanya karena minat, saya melihat beberapa cabang lain tentang pengaturan ini:
ip238:openlierox az$ git config branch.0.57.merge
refs/heads/0.57
ip238:openlierox az$ git config branch.0.57.remote
origin
Saya bertanya-tanya sekarang, apakah ada perbedaan antara "0,58" atau haruskah saya menentukan "refs / heads / 0.58"?
Apa sebenarnya perbedaannya?
headsdengan "s".