[ros-users] rosinstall with git

Thibault Kruse kruset at in.tum.de
Sun Oct 30 13:12:06 UTC 2011


On 10/30/2011 11:32 AM, Martin Günther wrote:
> Hi,
>
> On Sun, 30 Oct 2011 00:49:24 +0200
> Thibault Kruse<kruset at in.tum.de>  wrote:
>> 2. It could create tracking branches with the name of the remote
>> branch and try to stay on them when moving up or downstream with
>> rosinstall
>> 3. It could create tracking branches that can only move
>> forward with their remote branch
> If I understood you correctly, you are talking about the case where the
> remote branch has been reset to an earlier commit, right?
No, I am talking about moving back in time with the local repository. So 
you rosinstalll some stack based on remote foobranch.
Then in rosinstall you say version: tag1, with tag1 being some older 
commit than foobranch but being an ancestor of foobranch.

Now running rosinstall could go back to tag1 using "git checkout", and 
be untracked.
Or rosinstall could do "git reset --keep tag1" and thus still be on 
foobranch branch, but at tag1.
--keep is an option you probably have not used yet, it is a safe reset, 
aborting when there are conflicts.

So if you made new commits after a git reset --keep, they would be 
commits in your local foobranch branch, and this would
remind you that you might want to later merge with remote branch foobranch.
If we go untracked in this case as per option 1 or 4, then if you do 
commits you have to lookup which
branch to merge with unless you remember. Or worse you create dangling 
commits and forget about them,
with work being lost later on garbage collection.

However some user might prefer rosinstall to go untracked, because in 
their mind branches never go backwards in time.

cheers,
   Thibault



More information about the ros-users mailing list