Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings. Did you forget to include something in your last commit message?
Did you make a typo? Did you add something into your commit message that is not relevant? Git has a solution for you: the git commit —amend command. The syntax for the amend command is as follows: git commit --amend You can use this command without the -m flag. To change the files in a commit, first add the files you want to be included in your commit: git add redemption.
You can do this by using the —no-edit flag: git commit --amend --no-edit This command will change the files in your last commit. Photo Credit: Ken Suarez.
About melvin cedeno. Subscribe to SmartLogic Blog Get the latest posts delivered right to your inbox. Please wait Check your inbox and click the link to complete sign in. Please enter a valid email address! Jo Liss Jo Liss If you want to know the last time a file was modified no matter the branch, you can consider all branches by adding the --all option. If anyone here has the rep to make a 1-character edit, there's now an https version of the URL linked to in this answer.
Michael Erickson Michael Erickson 3, 2 2 gold badges 18 18 silver badges 16 16 bronze badges. You really did not explain why using git-log is inferior.
I would not say inferior, just that it provides extraneous information by default. If you are just going to filter out the commit information and use the ids, then you can just use git-rev-list in the first place. Since log is based on rev-list, it takes most of the same filter parameters.
Just something to keep in mind. Haven't found a command to get the merge commit yet, but I'm sure there is one — SvenS. For example in case it's useful for anyone … I create a current version id by considering the latest commit to change any source file assuming you mark versions with tags like mycode TheBamf TheBamf 5 5 silver badges 6 6 bronze badges.
Noufal Ibrahim Noufal Ibrahim Good point. I think you can also skip the -n and use -1 directly. Joe Joe 1 1 gold badge 5 5 silver badges 6 6 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
0コメント