A few words about git 🔧
Git is a distributed version control system, widely used for tracking changes in source code during software development.
It was created by Linus Torvalds in 2005 to support the development of the Linux kernel, with an emphasis on speed and efficiency for handling projects of any size.
Note: "distributed" means that unlike centralized version control systems (eg. SubVersion), where there's a single, central repository on a server that users check code in and out of, a distributed version control system doesn't rely on a central server to hold all the versions of a project's files. Instead, every developer has a full copy of the project repository on their local machine, including the entire history and all branches.
--amend 🔄
The --amend flag in Git is used with the git commit command to modify the most recent commit. This option allows you to make adjustments to the previous commit rather than creating a new one.
Suppose we have such a commit that is not well described.
We can rewrite the commit message by using:
git commit --amend -m "UPDATED MESSAGE - POSSIBLY DESCRIPTIVE"
Now, our updated commit message looks like this:
Conclusion ✔️
Having such descriptive commit message we can shamelessly push it to the remote repository, knowing that the updates are unambiguous. Git is a great version control tool and has many more effective features to offer that are worth mentioning in future articles. I will be happy to come back to the topic of version control systems as it is fascinating tool for modern development and a highly worth studying subject.
Top comments (0)