![]() ![]() ![]() So do your future self a favor, pause a second and write something useful.ĭescribe the change: why was it needed? what was the problem you try to fix?īe as short as possible, no need for epic descriptions If you ever try to go back in your git log to find a certain change and you can only see “minor fix”, it can become incredible hard to find the commit you’re looking for. They should describe the change in as few words as possible. It feels interrupting and you just want to get things done and don’t to waste time thinking about good commit messages.Ĭommit messages should be short and precise. It’s natural and understandable that people get annoyed and feel forced to write messages. Some people get annoyed about the fact that git commit asks them for a commit message every time and start using messages like “minor change”, “fix”, “updated README”. This was only saving your change locally and did not (yet) push it to your remote! You can do many changes without pushing to your remote, depending on your work style and collaboration mode. Git commit -m "delete path/to/file since it's obsolete" Git commit -m "fixed bug #123 by verifying input data" -a # you can combine the two previous commands if you only modified an existing file Git commit -m "implemented new feature A" When you work in your local repository: # review current status # if you want to commit to a repo, it is often more efficient to use SSH Git supports different protocols, typically you use one of the below: # clone for GitLab, GitHub etc. The following chapters are the simple commands to get you started. This is just a list of useful commands and practices I learned over time while using git. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |