私はgitマスターではありませんが、いくつかの異なるプロジェクトを使用して、しばらくの間作業を続けています。もちろん、私はいつでもgit clone [repository]、その時点から、いつでもできgit pullます。もちろん、目立った変更がない限り。
最近、前のブランチに戻す必要がありましたgit checkout 4f82a29。もう一度プルする準備ができたとき、自分のブランチをマスターに戻す必要があることに気付きました。今では、ストレートを使用してプルすることはできませんgit pullが、代わりにを指定する必要git pull origin masterがあります。
git pullオリジンマスターを指定せずにストレートを行うことができない変更点と、元に戻す方法
更新:
-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/*
更新2:明確にするために、元の方法が誤っていた可能性があることを理解していますが、このリポジトリを修正して、git pullもう一度使用できるようにする必要があります。現在、git pullの結果は次のとおりです。
-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.
git pullマージするブランチを指定できますが、正しく機能しますが、git pull以前のようには機能しませんgit checkout。