Why Test Automation?
Why Test Automation?
November 15, 2022
Key differences between Black Box Testing and White Box Testing
Key differences between Black Box Testing and White Box Testing
November 29, 2022

November 22, 2022

Useful Git CLI Tricks

A shortcut command that combines git add . and git commit -m [commit_message]:
-> git commit -am "easy peasy"

An even shorter method for creating an alias:
-> git config --global alias.ac "commit -am"
-> git ac "super efficient!"

Use the --amend flag to modify your last commit:
-> git commit --amend -m [commit_message]
Also use the --no-edit flag if you don't want to change the amended commit message:
-> git commit --amend --no-edit
However if you have already pushed your commits to remote, you need to lead a risky lifestyle and push your amended commit with the --force flag.
A nicer, more visual way to check your git log:
-> git log --graph --oneline --decorate

Checkout to the last branch that you were at but forgot its name:
-> git checkout -

Useful Git CLI Tricks
This website uses cookies to improve your experience. By using this website you agree to our Data Privacy Statement
Read more