| Can not wrap mind around proper workflow with EGIT to collab on remote GIT servers... [message #550345]
||Thu, 29 July 2010 21:42
Registered: July 2010
I am quite new to GIT and using EGIT on the Aptana Standalone platform. I finally got my GIT server up and finally got it properly configured so I can push and pull from EGIT.
I have been working on how to set this up for weeks, and although I keep getting close to my goal, I keep getting road blocks. I believe I am at my last roadblock if I could only understand how to properly use EGIT with my remote GIT repository with my partner.
It is just impossible for us to both work on the same repository/branch while remaining synced with eachothers pushed modifications.
Notes: The remote repository is bare
1. I am working via GIT+SSH from within EGIT
2. Computer A and Computer B use the same SSH account because it is a CPANEL host.
3. I manually set the username and email within the local GIT repository using the properties view in EGIT. Commits get properly pushed with the user that submitted it.
4. At the moment the project only has 2 developers, me and someone else. We both work from different computers and networks, so we are trying to utilize GIT on the remote server.
5. At first I tried creating a local branch from the local MASTER branch that was cloned from the repository, but I easily came across issues when trying to merge the secondary branch back into the Master Branch.
6. Projects are simple projects which need occasional bug fixes, so on the remote GIT we only have 1 branch which is the MASTER.
I. First person Scenario:
A. I clone the remote repository using EGIT
B. I make a modification to the MASTER branch, commit, and PUSH.
C. Everything works perfect and the push is commenced.
II. Two developers working on same Respository
A. I create a local clone on Computer A of the remote master
B. I create a local clone on Computer B of the remote master
C. On computer A i modify index1.html and commit it to the local branch.
D. On computer B I modify index2.html and commit it to the local branch.
E. On computer A I push the local Master branch back into the remote
D. Everything works fine and commits properly show up.
F. On computer B I try to push the change I made to the remote server but it gets rejected saying it is a non fast-forward.
G. So I Fetch from the Server, but it doesn't update the local master branch with the changes from the server.
H. I try to Merge my local branch with the remote branch but still get the non fast-forward error.
I. So now the changes made on computer B is dead in the water and no way to push it to the remote repository.
J. Computer A can still push and pull with no issues, but now computer B is useless unless I scrap the local repository and create another clone which will lose all the changes I have made.
I asking for assistance here because I think maybe I just do not have enough knowledge on the workflow or how EGIT functions with GIT and vice versa. I really want to start development on my project but it has taken me 2 weeks to get this far....
And now basically I finally got a point where I can use the remote GIT repository but only with one developer and not two.
Thank you in advance.
|Re: Can not wrap mind around proper workflow with EGIT to collab on remote GIT servers... [message #559829 is a reply to message #550345]
||Sun, 19 September 2010 13:20
| Matthias Sohn
Registered: July 2009
Fetch only updates the remote tracking branches, usually the default remote for the upstream repo your local repository has been cloned from is named origin. Hence when you run fetch EGit will check which new objects are available upstream and transfer them to your local repo and will update the remote tracking branch(es) usually that's refs/remotes/origin/master or in short origin/master. In order to update your local feature branch you need to either merge it with the updated origin/master or rebase your feature branch onto the updated remote tracking branch.|
Merging is now possible with EGit 0.9.3 which was released this week . If you have an earlier version either upgrade or run
the following from the command line:
# checkout your local feature branch
$ checkout myfeature
# merge what you fetched from upstream
$ merge origin/master
# alternatively if you want to rebase run instead of merge
$ rebase origin/master
If you get conflicts git /egit will put conflict markers into the conflicting files, resolve the conflicts by editing and stage the resolved conflicts using git add (also possible from egit via Team > Add).
Find detailed instructions for EGit merging here 
Powered by FUDForum
. Page generated in 0.01522 seconds