Uzak bir Bitbucket deposuna doğru itiyorum ve son zamanlarda bir meslektaşım oluşturduğu yeni bir şubeyi aynı depoya itti.
Yüklediği değişiklikleri almaya çalışıyorum.
$ git branch -a
* master
localbranch1
localbranch2
remotes/origin/master
$ git branch -r kaynak / ana
Bitbucket için web arayüzünde yaptığı dalı görebiliyorum. Bunu nasıl yapabilirim?
Sonraki deneme:
$ git fetch bitbucket
Password for 'https://xxxxx@bitbucket.org':
From https://bitbucket.org/user/repo
* branch HEAD -> FETCH_HEAD
Oluşturduğu dal new_branch_b olarak adlandırılırsa , aşağıdakileri görmeyi beklemeliyim?
$ git branch -r
origin/master
origin/new_branch_b
Üçüncü deneme:
$ git remote update
Fetching bitbucket
Password for 'https://xxxxx@bitbucket.org':
From https://bitbucket.org/user/repo
* branch HEAD -> FETCH_HEAD
$ git branch -r
origin/master
Dördüncü deneme:
[remote "bitbucket"]
url = https://user@bitbucket.org/user/repo.git
bitbucketKökeni değil uzaktan kumandayı aradım (en azından hatırladığım şey bu; Bir süre önce kurdum)
Beşinci deneyin:
Bitbucket uzaktan yapılandırmasını kan yanıtına göre güncelledim :
$ git config -e
[remote "bitbucket"]
url = https://user@bitbucket.org/user/repo.git
fetch = +refs/heads/*:refs/remotes/bitbucket/*
Çoğu insan için kökeni denir:
[remote "origin"]
url = https://user@bitbucket.org/user/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
Sonradan,
$ git remote update
Fetching bitbucket
Password for 'https://user@bitbucket.org':
remote: Counting objects: 48, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 35 (delta 21), reused 0 (delta 0)
Unpacking objects: 100% (35/35), done.
From https://bitbucket.org/user/repo
* [new branch] branch_name1 -> origin/branch_name1
* [new branch] branch_name2 -> origin/branch_name2
.... ve bunun gibi.
Ben git fetch originde işe yarayacağını düşünüyorum git remote update.
git fetch originişi yapar
refs/remotes/bitbucket/*yerinerefs/remotes/origin/*.