FGF-College-Work / Forum

:beer: Espaço dedicado a discussões e tira dúvida sobre disciplinas e conteúdo tecnológico.
MIT License
13 stars 4 forks source link

Revert Changes To a Particular Commit Id (git) #200

Open marcialwushu opened 4 years ago

marcialwushu commented 4 years ago
# Reset the index to the desired commit
git reset --hard <commit>

# Move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}

# Commit the changes
git commit -m "Revert to <commit>"

PREM KUMAR

marcialwushu commented 4 years ago

https://ma.ttias.be/pretty-git-log-in-one-line/#:~:text=By%20default%2C%20a%20git%20log%20looks%20like%20this.&text=Each%20commit%2C%20with%20the%20date,fit%20on%20a%20single%20line.

marcialwushu commented 4 years ago
$ git log --pretty=oneline

3396763626316124388f76be662bd941df591118 Add twitter link
c73bbc98b5f55e5a4dbfee8e0297e4e1652a0687 add facebook link