What is the
HEAD
master [branch]
?
What should I choose for the "Source ref" and "Destination ref", respectively?
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. Brilliant. Thanks!
Eclipse EGit™ EGit is an Eclipse Team provider for the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision of the code, making queries against the history very fast and versatile.
Step 1: Open Eclipse IDE and right-click on the project you want to push and go to Team->share project. Step 2: It will add the project to the given repository as shown below: Step 3: Again right-click on the project and go to Team->commit.
Push Refspecs This means that the currently checked out branch (as signified by the HEAD Reference, see Git References) will be pushed into the master branch of the remote repository.
You see this screen in Egit Push URI documentation:
That is where you define the refspecs:
A "refspec" is used by fetch and push operations to describe the mapping between remote Ref and local Ref.
Semantically they define how local branches or tags are mapped to branches or tags in a remote repository.
In native git they are combined with a colon in the format<src>:<dst>
, preceded by an optional plus sign,+
to denote forced update.
In EGit they can be displayed and also edited in tabular form in the Push Ref Specification and the Fetch Ref Specification and other dialogs.The "left-hand" side of a RefSpec is called source and the "right-hand" side is called destination.
Depending on whether the RefSpec is used for fetch or for push, the semantics of source and destination differ:
For a Push RefSpec, the source denotes a Ref in the source Repository and the destination denotes a Ref in the target Repository.Push Refspecs
A typical example for a Push RefSpec could be
HEAD:refs/heads/master
This means that the currently checked out branch (as signified by the
HEAD
Reference, see Git References) will be pushed into the master branch of the remote repository.
I think you should probably check out a learning guide to understand the terminology of git. Maybe look at this site: http://gitready.com/
master
is the default branch of the repo. Usually you consider this your "always working" production branch. Other work can be done in other branches and then merged into the master. "HEAD" is just the most recent changes regardless. In your case here, you would probably push to master (until you figure out branching).
In a nutshell, while you are learning git, stay on the master branch, and track the remote master branch, and push and pull from the master branch. You will soon discover a ton more amazing features of git as you go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With