Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a REMOTE branch using smartgit?

Tags:

git

smartgit

How to create a REMOTE branch using smartgit?

like image 792
Somedeveloper Avatar asked Aug 16 '10 13:08

Somedeveloper


2 Answers

As of SmartGit 6.5.9 ( August 2015 ):

  • check out (double click) the branch, that your new one should be based on (most likely you already did that)
  • right-click (as described) in the Branches-Tab on the local branch, you want your new branch based on. Use the (o) Custom Ref. The field is disturbingly short, wrongly making me think, this might only be for short git hashes like 92fa03d or such, but indeed setting new branch names like feature/JIRA-1234-your-feature-here do work as expected:

    enter image description here

  • double-click the new remote branch in the Branches Tab (origin fold-open). SmartGit will as usual offer to create a properly named and tracked local branch

like image 153
Frank Nocke Avatar answered Oct 27 '22 10:10

Frank Nocke


With the usual command-line Git, a remote reference is automagically created when you clone a remote repository with git clone href://... (which would call the remote 'origin' by default).

Or, you can add it manually with a command like git remote add origin href://.... To push up a branch, you would execute git push origin branchname. (See more detailed examples and explanation here.)

However, I can see that SmartGit is a little different (I have not used it myself), and is GUI-based. As far as I can see, the 'Clone' and 'Push' commands mentioned above can be found in SmartGit's 'Remote' menu. If you want to add a reference to a remote repository, is there an 'Add' option in the 'Remote' menu??

like image 35
ewall Avatar answered Oct 27 '22 11:10

ewall