Page 1 of 1

Git: Some useful cmds

Posted: 2024 Jul 22, 12:22
by Mihai
  • Hard reset to a older commit
Clone Repository branch dev:

Code: Select all

git clone --branch dev https://git.url/repo
Hard reset to a older commit:

Code: Select all

git reset --hard 0d13251515b04e69d589737b0fa6b4c40069f175
Force push changes from origin to remote branch dev:

Code: Select all

git push origin dev -f