How to go previous specific commit and how to delete last commit in github using netbeans IDE.

How to go previous specific commit and how to delete last commit in github using netbeans IDE.

Git in Apache NetBeans :

The Apache NetBeans IDE provides support for the Git version control system. The IDE’s Git features let you perform versioning tasks directly from your projects and code within the IDE.

You don't know how to push project in github using netbeans IDE then watch this tutorial and know how to push project in github using netbeans IDE.

1. Go previous specific commit in github using netbeans IDE :

Click on you project name then click on Team in top menu bar.

Go previous specific commit in github image-1

Then click on Checkout>Checkout Files.

Go previous specific commit in github image-2

Then click and tik mark on "Update Index with Entries from the Selected Revision".

Go previous specific commit in github image-3

Then click on origin master inside Remote and select your commit in right side.

Then click on select button.

Go previous specific commit in github image-4

Then click on checkout button.

Then click on checkout button.

See this below video for better understand :

2. Delete last commit in github using netbeans IDE :

Go to your project location.

Then open git bash or press shift + right click and click on "Open in Terminal".

You can delete commit using following command :

Delete last one commit :

git reset --soft HEAD~1

Delete last two commit :

git reset --soft HEAD~2

After applying above command push project in github :

git push -f -u origin master

See this below video for better understand :

3. Bonus : How to delete specific commit in github :

Watch this tutorial -> WATCH NOW

Post a Comment

0 Comments