[git-users] Help with getting desired git log output between two tags
Hi. What I am looking for is a way to list all commits between two tags. Given the diagram below, commit (6) and (H) each have a tag pointing to them. I want to figure out how to list all commits from (H) that have parents that lead back to (6). Note I am not looking for all commits reachable by (H) that are not reachable by (6). In the diagram I want to list all the letter commits and none of the number commits . Any thoughts? I suspect this is not possible, but wanted to ask others. Thanks, Mark 8 - 1 - 2 - 3 - 4 - 5 - 6 \ Q - R \ / \ \ 9 - (6) - B - C - D - E - F - (H) - 7 \ / / I - J - K / \ / M - N - P -- 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.
Re: [git-users] Help with getting desired git log output between two tags
Can't seem to make may email program draw nice ascii pics. Please see jpg attached. Hi. What I am looking for is a way to list all commits between two tags. Given the diagram below, commit (6) and (H) each have a tag pointing to them. I want to figure out how to list all commits from (H) that have parents that lead back to (6). Note I am not looking for all commits reachable by (H) that are not reachable by (6). In the diagram I want to list all the letter commits and none of the number commits . Any thoughts? I suspect this is not possible, but wanted to ask others. Thanks, Mark -- 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. attachment: git-branch-diag.jpg
Re: [git-users] Re: Documentation discrepancy
Thanks a lot everyone. Finally figured it out. I think that the following command sequence will do the trick: cp file file.unstaged git co file git commit file mv file.unstaged file I'll try to do a wrapper (`git-commit-staged' for example) and extend it on the case of multiple files. -- 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/-/-jSDM6GoYU8J. 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] Re: Documentation discrepancy
Thanks again. It seems I didn't express myself clearly. OK, let me elaborate on specific examples: *Scenario 1:* *$ cata.txt * alpha *$ git add a.txt * *$ cata.txt * beta *$ git st * # On branch master # Changes to be committed: # (use git reset HEAD file... to unstage) # # new file: a.txt # # Changed but not updated: # (use git add file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory) # # modified: a.txt # *$ git ci -m 'add a.txt' * *$ git st * # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # # Changed but not updated: # (use git add file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory) # # modified: a.txt # no changes added to commit (use git add and/or git commit -a) OK, that's clear. Next: *Scenario 2:* *$ catb.txt * gamma *$ git add b.txt * *$ catc.txt * delta *$ git add c.txt * *$ catb.txt * epsilon *$ catc.txt * zeta *$ git st * # On branch master # Changes to be committed: # (use git reset HEAD file... to unstage) # # new file: b.txt # new file: c.txt # # Changed but not updated: # (use git add file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory) # # modified: b.txt # modified: c.txt # Up till now it's also clear. Then we do: * * *$ git ci -m 'add c.txt' c.txt * *$ git st * # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # # Changes to be committed: # (use git reset HEAD file... to unstage) # # new file: b.txt # # Changed but not updated: # (use git add file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory) # # modified: b.txt # From the output of the above command I can conclude that b.txt, although having staged (as well as unstaged) changes, preserves its state exactly as it was before last commit, so git left other files except c.txt 'as-is'. To sum it up: «Scenario 1» tells that git lets us commit staged changes and preserves unstaged changes of a file. «Scenario 2» tells that git lets us commit only selected files from the index, and leave other files 'as-is'. What prevents us from combining these two behaviours, so that we could commit only selected files from the index, preserving their unstaged changes, as well as leaving other files 'as-is'? If it's too cumbersome an explanation, could you please tell me how to see which plumbing commands are executed with a specified porcelain command (something like a trace or debug feature)? I could have then decomposed `git commit' and `git commit file' into low-level commands and craft my own porcelain command based on those plumbing commands. -- 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/-/sqL98mmgvckJ. 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] Re: Documentation discrepancy
Thank you. Here is what I meant: echo alpha a.txt add a.txt echo beta b.txt add b.txt echo gamma b.txt Now I have a.txt and b.txt in staged state; and b.txt also has unstaged changes. I want to commit ONLY b.txt (i.e. I want to commit only 'beta' and leave b.txt in modified state with 'beta' 'gamma' in it, 'gamma' being showed as '+gamma' in `git diff'. Something like `git commit --staged b.txt' In other words, how do we `git commit' just one file from the index if there are more than one files in the index. -- 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/-/2X4cpPI1VccJ. 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] Documentation discrepancy
git commit --help 3. by listing files as arguments to the commit command, in which case the commit will ignore changes staged in the index, and instead record the current content of the listed files (which must already be known to git); ignore -- unstage ??? -- 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/-/lnFX1zB_u5IJ. 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.