Ok, this is a toal noob question. I must be missing something pretty obvious.
I'm using Coda to build web apps. I have git repositories in my local source folders that I now manage with SourceTree.
What's the SourceTree workflow to push a local repository to GitHub?
In SourceTree you can add a repository using the "Settings" button (top right):
Add a new remote repository and set the URL/path to your Github repository URL. The name can be whatever you want but for the default repository "origin" is a good option :)
The "Push" button in the menu should then allow you to select the repository you just added. Selecting the "Track" option will set up a tracking reference (it'll "link" your local branch to the given branch on the remote).
On the commandlone it looks like this:
git push -u origin master
git will automatically set up a tracking reference to that you can use git push/pull without having to explicitly add the remote and branch you want to push.
Thanks Stefan! What puzzled me was that after creating a "hosted" repository using the Create Repository button on the View > Show Hosted Repositories dialog, when I clicked on the "Push" icon it only lets me sleect "Custom" repositories.
The Setings Icon certainly lets me do it. But... It's not the most obvious UI. I need to know that clicking on the little Globe button is how I get to see my "hosted" repository list.
Many thanks for helping a bear of very little brain.
I can see why that might be confusing, it depends on how you got to the Create Repository dialog. If you got to it straight from the top-level hosted repositories view there's no link to any of your own repositories yet, which is why you have to then go into Settings in the repo to set that up. If you'd cloned the repo from GitHub then the remote would already be set up.
In future for new repositories, what you can do is go straight via Settings in the first instance, click Add Remote, and then click the 'World' icon, which brings up the hosted window again, but in the context of this repo. You can then Create Repository from here, and then select it to set up the remote. That way the process is a bit more seamless.
You need to add the github repository as a new remote.
So first create a Github repository and after creating it, it will show you a section with the commands to add it as a remote to your local repository
It will be something like the following from the commandline
git remote add origin email@example.com:user/repository.git git push origin master
When my mac reboots I'll see how to do that direct in sourcetree :)
As a kid I loved reading super hero comic books and the renewed interest these days in super heroes with all the Marvel and DC movies is pretty exciting to me. So, if you're like me today is all abou...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG