I cloned the repository and worked in the main branch. There was a sequential problem: git push (and git push ) did not work and gave a long, uninterpreted error message. Through a trial error, I found that git push origin master did the click correctly. But now I noticed something strange:
$ git config push.default tracking $ git push fatal: The current branch master is not tracking anything.
WTF? I thought that if you cloned a repository, the wizard was automatically tracked. Anyway, my real questions are:
- How should I create a clone to track branches?
- What are the consequences (other than current) of the lack of tracking?
- How to fix the current situation so that my branch tracks the remote?
EDIT My local repository acted strangely in other ways; first of all: I could not create remote branches. I put him aside and made a new clone, and he acted strangely in a new way.
First, master tracks (yes). Secondly, I was able to make a remote branch, but this is strange.
Ratatouille $ git push origin origin:refs/heads/premium Total 0 (delta 0), reused 0 (delta 0) To git@github.com:gamecrush/Ratatouille.git * [new branch] origin/HEAD -> premium Ratatouille $ git branch -r origin/HEAD -> origin/master origin/master origin/premium
Ratatouille is the name of the remote repo, of course. A strange moment: what is it for -> ? It seems new, and it does not appear for the old local repo or other remote clones.
But now branching and tracking jobs are being advertised.
git
Malvolio
source share