The following table describes common Git tasks.
To perform this task: |
Follow these steps: |
Place a Project under Git Version Control |
- Select the NetBeans project you wish to put under Git version control.
- Either choose Team > Git > Initialize
from the main menu, or
- Choose Versioning > Initialize Git Repository
from the right-click menu of a node in the Projects, Files or Favorites window.
The project is placed under Git control. You will then need to Commit the Project files.
|
Clone an External Repository |
- Choose Team > Git > Clone
from the main menu.
- In the Git Clone Repository wizard, specify the location of the Git repository,
and click Next.
- In the Parent Directory, specify the location on your computer where you want the
Clone to reside.
- In the Clone Name, specify the name of the Clone.
- Click Finish to Clone the remote repository.
|
Add Files to a Repository
|
- Select the file or directory that you want to add.
- Choose Team > Git > Add from the main menu.
|
Compare file revisions |
- Select the file that you want to perform a diff on.
- Choose Team > Git > Diff from the main menu.
|
View versioning information |
- Select the file or folder that you want to view the list of the changes made to.
- Choose Team > Git > Show Changes from the main menu.
|
Commit changes |
- Select the file or directory that you want to commit.
- Choose Git > Commit from right-click menu.
|
Push to default |
- Select the Cloned Git Project you want to Push changes to.
- Choose Git > Remote > Push from right-click menu.
This will Push changes to the Clone's parent Repository.
|
Pull from default |
- Select the Cloned Git Project you want to Pull changes into.
- Choose Git > Remote > Pull from the right-click menu.
This will Pull changes from the Clone's parent Repository.
|