-
Notifications
You must be signed in to change notification settings - Fork 0
git commands
Alan B. Christie edited this page Feb 25, 2026
·
2 revisions
Here are a few relatively common (and handy) git commands.
There is also an extremely useful, and comprehensive, official git cheat-sheet.
- Seeing the commit log
-
You can inspect commit messages on a branch (e.g.
main) and their commit checksums: -git log main --pretty=oneline - Display tags
-
Here we list tags that start "2026.": -
git tag -l "2026.*"You can also get detailed for a taginclude who made it, when and the message: -git show 2026.01.1 - Checkout a tag
-
git checkout 2026.02.1 - Creating a tag
-
Annotated tags are preferred over lightweight tags.we provide
-ato indicate it's annotated and thenprovide a simple message on the command-line.Alternatively, omit the-mand its messageto enter an editor where you can provide a more detailedmessage.git tag -a 2026.02.2 -m "Release 2026.02.2" - Creating a tag (for a prior commit)
-
To tag a prior commit, you simply have to add the commit checksum(or part of it) to the end of the tag command:-
git tag -a 2026.02.2 9fceb02
Policies
- Using non-xchem repositories
- Approved build tool (uv)
- Embrace pyproject.toml
- Use pre-commit
- Creating releases
- Declaring dependencies
- Merging to trunk
- Write tests
- Continuous integration
Advanced topics
Other ideas
Inspiration
Cheat-sheets