Re: [git-users] How to add a file later to a commit?

2015-05-21 Thread Magnus Therning
On 22 May 2015 at 08:29, Konrád Lőrinczi  wrote:
> How can I add a file later to a commit?
> I created a new branch and submitted a commit with 2 files.
>
> I observed, that one more file should have been submitted with this commit,
> so I would like to add a file to an earlier commit.
>
> Any solution for this?

If it's the latest commit you want to amend, then have a look att `git
commit --amend`.  If it's not the latest commit you can start with an
interactive rebase (`git rebase -i`), mark the commit you want to
change for 'edit', and then use `git commit --amend`.

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

-- 
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/d/optout.


[git-users] How to add a file later to a commit?

2015-05-21 Thread Konrád Lőrinczi
How can I add a file later to a commit?
I created a new branch and submitted a commit with 2 files.

I observed, that one more file should have been submitted with this commit, 
so I would like to add a file to an earlier commit.

Any solution for this?


Thanks,
Konrad

-- 
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/d/optout.