Git will always fix-up the revision to be correct if any of the non-timestamp factors are different. In most other cases, the parent will usually be different, and, this alone, means that your dream of forcing a certain revision will be dead. In this case, you can force the identical revision in order to force the timestamps to be unchanged. This works in only the very narrow case where you have the exact same branch, parents, and committer (such as with a code-review-centric process where you have a bunch of commits queued up somewhere, where the developers can push them up and bring them down without necessarily submitting them into the repository first) really only when the timestamps are the only thing that might have changed. That exact revision will now be your HEAD: $ git log -oneline | head -n 6ī97fb61a Print the type of the password instead of the password itselfħ90a3be8 adjust pytest pins to fix testing infraĮfdd0ece Linked how to make a pull requests in READMEĪs mentioned in other answers, you still have to follow the rules. Add a new entry to the bottom (just "pick" and your revision no description necessary) with the exact revision that you want to prepend: pick efdd0ece Linked how to make a pull requests in README git rebase -i Then proceed as described in leopds answer, changing all the picks to squashes except the first one.Pick b97fb61a Print the type of the password instead of the password itself If you have lots of commits and you only want to squash the last X commits, find the commit ID of the commit from which you want to start squashing and do. Pick 790a3be8 adjust pytest pins to fix testing infra The screen now shows this: pick efdd0ece Linked how to make a pull requests in README Open an interactive rebase session: $ git rebase -i HEAD~4 In this example, all the files except the one called DoNotCommit.php contain at least one line we want to commit: Next, we need to open the Index Editor for all files containing lines of Feature A and Feature B. First of all, stage all the files containing changes to be committed. ) may not.Go into interactive rebase ("git rebase -i") and paste a new entry at the end with the exact revision you want to prepend to your HEAD. You can achieve that using the stage command. The format should be:Īll sources (including GitPro book, which goes for 50 characters for the first line, as Jörg W Mittag comments) insist on the necessity to wrap yourself the comment, certainly because, even if Git was able to deal with long lines, other tools in the processing chain (email, patches. cd submodule git checkout -b NEWBRANCHNAME COMMITID. Hence enter the dependency root by using cd submodule and use any git command. In general, use an editor to create your commit messages rather than passing them on the command line. git submodules are repositories inside a repository, hence it has the same behavior as any other git repository. Good email netiquette dictates we wrap our plain text emails such that there's room for a few levels of nested reply indicators without overflow in an 80 column terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |