Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-ocl.dev] EGit Guidelines

Hi Laurent

Thanks for the confirmation that the material was not lost to a git expert.

Fortunately the actual changes were small, so I've redone them after learning the lesson that to work with a remote branch you should create a local branch from it so that the remote is the upstream configuration. Then it all works well.

    Regards

        Ed


On 29/07/2011 15:15, Laurent Goubet wrote:
Ed, If you have checked out "origin/*" and tried to commit there ... your commit is not lost, but it is not on any branch. If you checkout origin/* your "HEAD" pointer is moved to the last commit of that branch, but outside of any local branch so that a commit there will be sent to the repo without being attached to any branch.

Axel or someone who knows the command line better than me will help better, but it should be possible to use "git log" or "git reflog" to find the ID of your commit, the maybe cherry-pick that commit on an existing branch (or create a branch for it?

On 29/07/2011 15:44, Axel Uhl wrote:
If you checked out "bug/....." then you're on your local branch. A remote branch probably wouldn't even allow you to commit to it. I presume, your changes should be in your local bug/..... branch.

Not sure I understand your second question. When you fetch a remote branch into a local tracking branch, there should be two branch tags: remote/origin/bug/..... and bug/..... where the former is the tag for the remote branch which AFAIK only is modified by fetch/push operations, and the latter is your local branch which will be advanced, e.g., by commit, merge and rebase operations.

Usually, you work away on your local bug/..... branch by doing commits. At some point you may push the local branch to the remote (e.g., origin) which will automatically update your remote/origin/bug/..... tag to match the remote repository's bug/..... tag.

-- Axel

On 7/29/2011 3:29 PM, Ed Willink wrote:
Hi

I thought I was getting the hang of this but today's been a total disaster.

I started with bug/353117 which was pushed upstream from my laptop.

I discarded pending experiments in my tower's workspace, then checked
remote tracking bug/353117 out on my tower and made minor changes for
comments and 3.2 API declarations. I committed these so that I could
rebase.

I had a lot of trouble with obsolete projects, Acceleo rebuilds and
selective .gitignore causing changes to appear and so I did quite a lot
of synchrionizing, overwriting, rebasing and and resetting, but my the
time I came to merge into local master it seems all my changes have been
lost.

As far as I can see, committed work should not be lost, so since I did a
commit with a comment, it should exist somewhere, but where?

I think my main mistake was working in the checked out remote tracking
bug/353117 and committing to it, rather than making a local branch from
it. But if I did that I'm not sure how I would merge back into the
upstream branch.

So I have two questions?

Where is my lost work, and associated commit, that does not show in the
History View?

How should I do further work on a remote tracking branch?

EGIT only answers please.

Regards

Ed

On 29/07/2011 07:42, Ed Willink wrote:
Hi

My aim today/this weekend is to commit Bug 353171 to master and R3_1
streams and while
doing so get to grip grips withe EGit and condense the conclusions of
the lengthy Bugzilla discussions
into http://wiki.eclipse.org/MDT/OCL/Dev/EGit, so please don't
duplicate effort, and please try
to review my efforts next week.

Regards

Ed Willink
_______________________________________________
mdt-ocl.dev mailing list
mdt-ocl.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-ocl.dev


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3793 - Release Date: 07/28/11



_______________________________________________
mdt-ocl.dev mailing list
mdt-ocl.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-ocl.dev


_______________________________________________
mdt-ocl.dev mailing list
mdt-ocl.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-ocl.dev


_______________________________________________ mdt-ocl.dev mailing list mdt-ocl.dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/mdt-ocl.dev
----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3796 - Release Date: 07/29/11

Back to the top