[Vm-dev] git and branch JMM/SleepTime
Tobias Pape
Das.Linux at gmx.de
Wed Mar 22 22:16:12 UTC 2017
> On 22.03.2017, at 23:04, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> Hi Tobias,
>
> On Wed, Mar 22, 2017 at 2:54 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
>
> > On 22.03.2017, at 22:36, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >
> >
> >
> > On Wed, Mar 22, 2017 at 2:34 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
> >
> >
> > > On 22.03.2017, at 22:33, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> > >
> > > Hi Stefan,
> > >
> > > On Wed, Mar 22, 2017 at 2:10 PM, Stefan Marr <smalltalk at stefan-marr.de> wrote:
> > >
> > > Hi Eliot:
> > >
> > >> On 22 Mar 2017, at 21:47, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> > >>
> > >> I don't understand how to see a branch's changes.
> > >>
> > >> I updated a clone of opensmalltalk-vm and switched to John's JMM/SleepTime branch:
> > >>
> > >> McStalker.oscogvm.clean$ git pull -a
> > >> Already up-to-date.
> > >> McStalker.oscogvm.clean$ git checkout -b JMM/SleepTime
> > >
> > > This looks wrong.
> > > That’s just creating a fresh branch, no?
> > >
> > > You’ll probably need some variant of: git checkout -b JMM/SleepTime origin/JMM/SleepTime
> > >
> > > `git log` should then also be a better way to check whether you’re on the branch you expect.
> > >
> > > So now I'm in this state:
> > >
> > > McStalker.oscogvm.clean$ git status
> > > On branch Cog
> > > Your branch is up-to-date with 'origin/Cog'.
> > > nothing to commit, working tree clean
> > >
> > > What do I type to get to John's changes?
> >
> > git diff JMM/SleepTime
> >
> > What do I type to see John's changes materialised in the relevant files in my repository? I don't want to copy/paste his changes :-/
>
> I don't get it right away.
> Do you want Johns changes applied to your branch?
>
> git merge JMM/SleepTime
>
> (Or if you don't want to commit right away:
>
> git merge --no-commit JMM/SleepTime
>
> Do you want to see the general commit information of John's commit?
>
> git log ..JMM/SleepTime
>
> Do you want to see the difference between Cog and JMM/SleepTime ?
>
> git diff JMM/SleepTime # if you are on 'Cog' and previously did 'git checkout JMM/SleepTime'
> git diff Cog..origin/JMM/SleepTime # otherwise
>
> I want tio checkout the latest committed version of John's branch without merging. Preferably I want to be able to do that from a dirty state on another branch such that IU can switch back to that dirty state.
$ git status
# shows some Ms
$ git stash
# put away changed things
$ git status
# shows no Ms
$ git checkout JMM/SleepTime
# should be equivalent to 'git checkout -b JMM/SleepTime origin/JMM/SleepTime'
# you are now on Johns branch. What is the difference to cog?
$ git diff Cog
# what are the latest changes on this branch briefly?
$ git log
# ok, I'm done, back to Cog
$ git checkout Cog
# Maybe merge John's code
$ git merge JMM/SleepTime
# creates commit
# get back the put away things
$ git stash pop
Best regards
-Tobias
>
>
> Best regards
> -Tobias
>
> >
> >
> > ?
> > >
> > >
> > > Best regards
> > > Stefan
> > >
> > >
> > > --
> > > Stefan Marr
> > > Johannes Kepler Universität Linz
> > > http://stefan-marr.de/research/
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > _,,,^..^,,,_
> > > best, Eliot
> >
> >
> >
> >
> > --
> > _,,,^..^,,,_
> > best, Eliot
>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
More information about the Vm-dev
mailing list