Re: (beginner) git rm

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

 



Zabre:

> I delete one file in the new branch
> $ git rm d.txt
> $ ls
> a.txt b.txt c.txt

Here you have not yet committed the change, so the change is only in
the staging area. You need to

  git commit

to create a commit on your branch.

> Then I go back to the master branch and list the files there
> $ git checkout master

Since you have not yet made any commits to your branch, master and new
both point to the same commit, meaning that this is does nothing but
changes which branch you are committing to.

> $ls
> a.txt b.txt c.txt

You are in the same place as you were a moment ago, but you have told
Git that you want to commit the removal to master instead of new.

-- 
\\// Peter - http://www.softwolves.pp.se/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux