Non sono un maestro git, ma ci lavoro da qualche tempo, con diversi progetti. In ogni progetto, sempre git clone [repository]
e da quel momento, posso sempre git pull
, purché non abbia cambiamenti eccezionali, ovviamente.
Di recente, ho dovuto tornare a una succursale precedente e l'ho fatto con git checkout 4f82a29
. Quando ero di nuovo pronto a tirare, ho scoperto che dovevo riportare il mio ramo al padrone. Ora, non posso tirare usando una scala git pull
ma invece, devo specificare git pull origin master
, che è fastidioso, e mi indica che non capisco perfettamente cosa sta succedendo.
Cosa è cambiato che non mi consente di fare una scala git pull
senza specificare il master di origine e come posso cambiarlo?
AGGIORNARE:
-bash-3.1$ cat config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch "master"]
[remote "origin"]
url = git@github.com:user/project.git
fetch = refs/heads/*:refs/remotes/origin/*
AGGIORNAMENTO 2: Per essere chiaro, capisco che il mio metodo originale potrebbe essere stato errato, ma ho bisogno di correggere questo repository in modo da poterlo semplicemente utilizzare di git pull
nuovo. Attualmente, git pull risulta in:
-bash-3.1$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.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 ').
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.master.remote =
branch.master.merge =
remote..url =
remote..fetch =
See git-config(1) for details.
Posso dire git pull
quale ramo unire e funziona correttamente, ma git pull
non funziona come prima in precedenza git checkout
.