I'm not a git master, but i have been working with it for some time now, with several different projects.in each project, i always
git clone [repository] and from that point, can always
git pull, so long as i don't have outstanding changes, of course.
Recently, i had to revert to a previous branch, and did so with
git checkout 4f82a29.when i was again ready to pull, i found that i had to set my branch back to master.Now, i can not pull using a straight
git pull but instead, have to specify
git pull origin master, which is annoying, and indicates to me that i don't fully understand what is going on.
What has changed which does not allow me to do a straight
git pull without specifying origin master, and how to i change it back?
-bash-3.1$ cat config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [branch"master"] [remote"origin"] url = email@example.com:user/project.git fetch = refs/heads/*:refs/remotes/origin/*
UPDATE 2 : to be clear, i understand that my original method may have been incorrect, but i need to fix this repo so that i can simply use
git pull again.Currently, git pull results 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.
I can tell
git pull which branch to merge, and it works correctly, but
git pull does not work as it did originally before my