On 12/8/2013 4:49 PM, Bjørn Roald wrote:
On 12/08/2013 08:35 PM, Edward Diener wrote:
On 12/8/2013 1:22 PM, Bjørn Roald wrote:
On 12/08/2013 05:54 PM, John Maddock wrote: ... unless there's some way to convert local
modifications into a fork?
The fork on GitHub is just a clone of the repository, much like the one you have changes in. It is a so-called /bare/ repository, i.e.: there are no checked out files - just the .git folder content. Since you are the owner of this repository, you can push your feature/whatever branch changes to it.
I created a local branch of a particular Boost repository giving it a descriptive name. This was successful.
I then tried creating a repository in GitHub under my own name. This was successful and a 'master' branch was created for it. The 'master' branch is empty except for a readme.md file which GitHub commits to it.
I then tried pushing my local branch to my GitHub url/master remote just created but was not able to do this. I am using TortoiseGit on Windows. For whatever reason TortoiseGit refuses to recognize that I have a 'master' branch of my new GitHub repository. It says:
"Don't know what will push because unknown branch 'myremote/master'"
Are you using TortoiseGit, in that case see if there is a window showing the git command lines it uses. Post them.
I tried the push command anyway where the remote url has the name "myremote" for the URL https://github.com/eldiener/mplsun.git. The local branch is called "suncc" ( it is actually a Sun compiler fix for Boost MPL on its own branch ). The git command shown is: git.exe push -v --progress "myremote" suncc:master The result is: Pushing to https://github.com/eldiener/mplsun.git To https://github.com/eldiener/mplsun.git ! [rejected] suncc -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/eldiener/mplsun.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and merge the remote changes hint: (e.g. 'git pull') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details What does it mean that a "pushed branch tip is behind its remote" ? All I am trying to do is 'push' this repository onto an almost entirely empty remote repository. How hard can that be with git ?
I think you get that error form some TortoiseGit layer, does not look like something I expect from the comand line push, but I may be wrong. In any case the branch 'myremote/master' part give me a hunch of what the problem is. If myremote is a reference to your remote repository fork at GitHub, then git expect:
git push myremote master
not
git push myremote/master
which uses the default remote, probably origin, so it tries
git push origin myremote/master
wich causes it to think myremote/master is a branch you want to push but it can't find.
HTH -- Bjørn
Obviously, being a git novice, I am missing something about git. I thought one could push any local repository to any remote repository as long as one had write permission to the remote repository.
You should be able to, does not necessarily make any sense though ;-)