Tags in Git are used to label specific commits (to mark releases, for example). Once created locally, Git tags can be pushed to a remote repository. In this note i will show how to delete local Git tags using a git tag –delete command and how to remove Git tags from a remote repository.
Tags in Git are used to label specific commits (to mark releases, for example). Each tag points directly to a specific commit in the Git history. In this note i will show how to checkout a tag in Git and how to create a new branch from it.
Tags in a Git repository can be listed using the git tag command. Before listing all the tags it is required to ensure that the latest tag list from the remote repository has been fetched. On the other hand, even without pulling or fetching, it is possible to get a list of tags on the […]
Git stores configuration data in three different scopes: local, global and system. Using the git config command we can list all Git config settings as well as only local, global or system settings. For each scope, Git stores settings in different config files and it may be useful to know how to locate those files. […]
Sometimes it may be complex to debug Git errors, like “fatal: repository not found” or “fatal: authentication failed” with the default level of verbosity in Git. To debug different network, security, performance and many other issues in Git it is very helpful to know how to increase verbosity. In this note i am showing how […]
A Git commit ID is a 40 digits long SHA-1 hash, that can be abbreviated up to the shortest 4 digits version (7 by default). In this note i am showing how to abbreviate the long hash to a short hash in Git and how to display the abbreviated hashes in the outputs of the […]
In Git we can gracefully revert all changes to the specific commit without using the potentially dangerous git reset command. In this note i am showing how to undo local changes by making a rollback to the specific commit and how to revert a commit that has already been pushed to remote.
In this article i am showing how to clear Git history by removing all commits. You may need this if you want to delete sensitive data from the history of Git commits. After such cleanup you will have the latest version of your Git repository, but with the one commit only. Be aware that after […]
To connect to a Git repository with authentication over HTTP(S), every time it needs to set a username and password. You can configure Git to remember a username and password by storing them in a remote URL or by using Git credential helper. In this article i am showing how to clone Git repository by […]
Instead of committing directly in local master branch, a good developer creates a new branch each time he starts working on a new bug or feature. To create a new branch there is a git branch command. Below i will show the examples of how to create a new local branch in Git from another […]