Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » git remote add [alias] [url]
git remote add [alias] [url] [message #773848] Mon, 02 January 2012 17:54 Go to next message
Mark Himsley is currently offline Mark Himsley
Messages: 4
Registered: January 2012
Junior Member
I would like to do the equivalent of "git remote add alias url" from the EGit UI, so that the remote appears in the team->remote->push 'configured remote repository' drop-down.

Is it possible?

Thanks

--
Mark
Re: git remote add [alias] [url] [message #774236 is a reply to message #773848] Tue, 03 January 2012 15:14 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel Doninger
Messages: 119
Registered: October 2010
Senior Member
Go to the "Git Repositories" view, open the tree of the repository you want, right-click on "Remotes" and select "Create Remote". Remote name is the alias, and the url is specified in the second step of the wizard.
Re: git remote add [alias] [url] [message #774336 is a reply to message #774236] Tue, 03 January 2012 18:20 Go to previous messageGo to next message
Mark Himsley is currently offline Mark Himsley
Messages: 4
Registered: January 2012
Junior Member
Brilliant. Thanks!
I was looking in the "team" context menu, I wasn't looking in the "Git Repositories" view.

--
Mark
Re: git remote add [alias] [url] [message #789591 is a reply to message #774236] Fri, 03 February 2012 06:43 Go to previous messageGo to next message
Yong-Seok Choi is currently offline Yong-Seok Choi
Messages: 2
Registered: February 2012
Junior Member
"git remote add origin git@YOUR_SERVER_HOSTNAME:free_monkey.git"
I created remote by your methods.

The server's repository is empty. So, I need the following command.
"git push origin master:refs/heads/master"

How can I exec the command in Egit?
There is no branch at the new local repository.
Re: git remote add [alias] [url] [message #789668 is a reply to message #789591] Fri, 03 February 2012 08:50 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel Doninger
Messages: 119
Registered: October 2010
Senior Member
If you have no local branch, there is nothing you can push. You have to create a branch and do one or more commits to push that commits.
Pushing is possible when you right-click on a project or on a repository in the repositories view.
Re: git remote add [alias] [url] [message #792443 is a reply to message #789668] Tue, 07 February 2012 01:57 Go to previous messageGo to next message
Yong-Seok Choi is currently offline Yong-Seok Choi
Messages: 2
Registered: February 2012
Junior Member
how can i create local branch?

there is no create menu by right click at local.




  • Attachment: 3.JPG
    (Size: 11.77KB, Downloaded 132 times)
Re: git remote add [alias] [url] [message #793742 is a reply to message #792443] Wed, 08 February 2012 14:03 Go to previous message
Manuel Doninger is currently offline Manuel Doninger
Messages: 119
Registered: October 2010
Senior Member
If you commit a change, the branch "master" will automatically be created. Then you can create a new branch, if you right click on the repository, and then choose "Switch to" -> "New branch".
Since branches are pointers to a commit in Git, you must have at least one commit, otherwise there is nothing a branch could point to.
Previous Topic:EGit (or maybe JGit) checks out the wrong branch
Next Topic:getting bundle support into jgit/egit
Goto Forum:
  


Current Time: Tue Oct 21 13:48:33 GMT 2014

Powered by FUDForum. Page generated in 0.01960 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software