libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] git problem while preparing gnu_linux.c for start tr


From: Edd Barrett
Subject: Re: [Libcdio-devel] git problem while preparing gnu_linux.c for start track number > 1
Date: Thu, 27 Dec 2018 09:41:43 +0000
User-agent: Android

Hi Thomas,

If I understand correctly, you want to save the 'M's for later and get back to 
a clean master. There's a couple of things you can do.

You could do 'git stash' to squirrel away the changes until a later 'git stash 
pop'. The problem with this is, you may forget to pop.

You could also commit those changes to another branch and revisit the branch 
later (git checkout -b another-branch && git commit --all). Even if the changes 
are unfinished, you can always refactor the commit history at a later date.

If you don't care about the changes, you can totally discard them with 'git 
reset --hard branch-name'.

Once you have dealt with your changes, you can make a new branch with 'git 
checkout -b branch-name' and the new branch will diverge from where you were 
previously.

Hope that helps!

⁣--
Edd Barrett​

On 27 Dec 2018, 08:56, at 08:56, Thomas Schmitt <address@hidden> wrote:
>Hi,
>
>i tried to create a branch for my fix in lib/driver/gnu_linux.c but
>now "git diff" shows unintended deviations:
>
>  $ git checkout master
>  M       include/cdio/types.h
>  M       lib/iso9660/iso9660_private.h
>  Switched to branch 'master'
>  Your branch is up-to-date with 'origin/master'.
>
>  $ git pull
>  ...
>   15 files changed, 334 insertions(+), 195 deletions(-)
>   create mode 100644 test/driver/cdtext.c
>
>  $ git checkout -b trackno-higher-one
>  M       include/cdio/types.h
>  M       lib/iso9660/iso9660_private.h
>  Switched to a new branch 'trackno-higher-one'
>
>The "M" action is unintended. I want the current original state of
>"master" as foundation of a new branch "trackno-higher-one".
>
>The diff of types.h and iso9660_private.h seems to be about an
>experiment
>to silence "riddling error messages which appear if <stdbool.h> is
>included
>after <cdio/iso9660.h>":
>  From: "Thomas Schmitt" <address@hidden>
>  To: address@hidden
>  Date: Sun, 15 Jul 2018 11:54:53 +0200
>  Message-Id: <address@hidden>
>
>
>What would a git expert do now ?
>
>I could revert the pending changes and thus lose the obviously
>uncommitted
>experiment. But how would i preserve such an experiment from a
>different
>branch while i want to make a change to the remote git repo ?
>
>Can i simply keep the changed files, commit only my change to file
>gnu_linux.c, and push my new branch "trackno-higher-one" without
>interference by those changes ?
>
>
>Have a nice day :)
>
>Thomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]