[git-users] git add and untracked file
Hello, My aim is to add to a git tree changes in modified files and to create a patch. I do **not** want that the patch will contain untracked files. When I try git add -A, it adds also the untracked files, and later, after git commit -m blablabla and git format -n1, I see the untracked files in the patch. I know that I can add the name for each untracked file in .gitignore; in this way , the patch will not include the untracked files; but I need a way to achieve this without adding to .gitignore each untracked files. So - is there a way to perform git add only on modifed files (and not by adding each modified file separatel by git add) ? is there a way to list of modified files only (to use it later)? rgs, Kevin -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git add and untracked file
hi, this should help: http://stackoverflow.com/questions/572549/difference-of-git-add-a-and-git-add good luck! radovan On Tue, 10 Jan 2012 20:54:31 +0100, Kevin Wilson wkev...@gmail.com wrote: Hello, My aim is to add to a git tree changes in modified files and to create a patch. I do **not** want that the patch will contain untracked files. When I try git add -A, it adds also the untracked files, and later, after git commit -m blablabla and git format -n1, I see the untracked files in the patch. I know that I can add the name for each untracked file in .gitignore; in this way , the patch will not include the untracked files; but I need a way to achieve this without adding to .gitignore each untracked files. So - is there a way to perform git add only on modifed files (and not by adding each modified file separatel by git add) ? is there a way to list of modified files only (to use it later)? rgs, Kevin -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Help! Git deleted my files!
I just added the complete contents of a directory to my project, and committed. $ git add foo/ $ git commit -m Add foo. Then I realized that I actually did not want to add all those files. So I tried to step back with: $ git reset --hard HEAD^ Git rolled back the commit okay, but also DELETED ALL THE FILES in that directory! Please tell me there is a way to them back. And why the heck did git think it okay to delete them? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/bjee0Dx3hjEJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Help! Git deleted my files!
I figured it out. $ git reflog Then $ git checkout -b someName shaOfResetCommit Thankfully git doesn't actually delete anything for some 90 days after the fact. My mistake was to use `--hard`, but I didn't think it would delete the files b/c there were not being tracked before this particular commit. Lesson learned! -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/TSJZ14vTqmYJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.