Output from a fast check:

===
$ echo " " >>cmfcpu15.sh
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   cmfcpu15.sh

no changes added to commit (use "git add" and/or "git commit -a")
$ git checkout master
M       cmfcpu15.sh
Already on 'master'
Your branch is up-to-date with 'origin/master'.
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   cmfcpu15.sh

no changes added to commit (use "git add" and/or "git commit -a")
$
===

So it appears you are correct


On Fri, Feb 28, 2014 at 5:14 AM, Gunnar Strand
<gunnar.str...@ericsson.com>wrote:

>
> On 02/28/14 09:41, Daniel Hunsaker wrote:
>
> All that will happen is that any changes you've made to files git is
> tracking in the current commit will be reverted.  New files will be left
> intact, as will ignored ones, but deleted files will be restored.
>  Basically, checkout does its best to get you to the exact state described
> in the commit you specify, which in this case is the commit at the tip of
> master.  If you haven't made any changes since the last checkout, it will
> do nothing at all.
>
>
> Please correct me if I am wrong, but as far as I can tell using
> experimentation, checking out master while on master has no effect at all,
> regardless of whether files are changed, deleted, in the index or not.
>
> BR
> Gunnar
>
>
>  On Fri, Feb 28, 2014 at 1:27 AM, dexter ietf <dexter.i...@gmail.com>wrote:
>
>> i'm already on master branch, what's the effect of running the 'git
>> checkout master' while on master branch ?
>>
>>  thanks
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Wasn't there something about a PASCAL programmer knowing the value of
everything and the Wirth of nothing?

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to