DEV Community

Rohit More
Rohit More

Posted on

1

𝟲 𝗚𝗶𝘁 𝗵𝗮𝗰𝗸𝘀 𝘆𝗼𝘂 𝘀𝗵𝗼𝘂𝗹𝗱 𝗱𝗲𝗳𝗶𝗻𝗶𝘁𝗲𝗹𝘆 𝗸𝗻𝗼𝘄🚀

𝟭. 𝗠𝗼𝗱𝗶𝗳𝘆 𝘁𝗵𝗲 𝗺𝗼𝘀𝘁 𝗿𝗲𝗰𝗲𝗻𝘁 𝗰𝗼𝗺𝗺𝗶𝘁

use git commit --amend

𝟮. 𝗙𝗶𝗻𝗱 𝗯𝗿𝗮𝗻𝗰𝗵𝗲s 𝗯𝘆 𝗰𝗼𝗺𝗺𝗶𝘁

use git branch --contains

𝟯. 𝗥𝗲𝗺𝗼𝘃𝗲 𝗳𝗶𝗹𝗲 𝗳𝗿𝗼𝗺 𝘁𝗵𝗲 𝗹𝗮𝘀𝘁 𝗰𝗼𝗺𝗺𝗶𝘁

use git rm --cached
followed by git commit --amend

𝟰. 𝗥𝗲𝗻𝗮𝗺𝗲 𝗯𝗿𝗮𝗻𝗰𝗵𝗲𝘀 𝗹𝗼𝗰𝗮𝗹𝗹𝘆

use git branch -m old-name new-name
For more information type
git help branch

𝟱. 𝗪𝗵𝗮𝘁 𝗰𝗵𝗮𝗻𝗴𝗲𝗱 𝗶𝗻 𝗮 𝘀𝗽𝗮𝗻 𝗼𝗳 𝘁𝗶𝗺𝗲

use git whatchanged --since="2 weeks ago"

𝟲. 𝗧𝗶𝗺𝗲 𝘁𝗿𝗮𝘃𝗲𝗹𝗶𝗻𝗴 𝘂𝘀𝗶𝗻𝗴 𝗚𝗜𝗧

use git reflog
It shows you the list of all the things you've done so far.

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay