2. The following are the steps that need to be followed when installing GitHub
plugin in Anypoint Studio
1. In Studio, click the Help menu, then select Install New Software
2. In the Work with field of the Available Software panel, use the drop-
down menu to select
3. http://download.eclipse.org/egit/updates-2.1
4. In the table below the Work with field, click the check boxes associated
with Eclipse Git Team Provider and JGit.
3. 4. Click the expand arrow to the left of both Eclipse Git Team
Provider and JGit and in the submenus that appear, then click to
deselect the following three items
a. EGit Mylyn
b. Eclipse EGit â Source
c. Eclipse JGit - Source
d. Eclipse Plugin-in Import Support
4. 5. In the Install Details panel, click Next to continue installation.
Please ensure you select the below specified items
a. EGit Mylyn
b. Eclipse EGit â Source
c. Eclipse JGit - Source
d. Eclipse Plugin-in Import Support
5. 6. In the Review Licenses panel, select I accept the terms of the license
agreement, then click Finish.
7. After Mule has installed the EGit plugin, click Yes to complete the
installation and restart Studio.
6. Saving a Studio Project to Git
Create a Git repository so that multiple developers can save changes to a
Studio project in one shared location. To do so, you must first create and
register a Git repository
Creating a Local Repository
1. In the Package Explorer, right click the name of your project, go
to Team, then select Share Project
7. 2. A new wizard to select the repository plugin that will be used to share
the selected project and click Next. (If multiple plugins are installed)
8. 3. In the Configure Git Repository wizard, click Create
9. 4. In the Create a Git Repository panel, click Browse & navigate to
the GIT folder on your local drive
10. 5. Mule populates the fields in the Configure Git Repository panel to
correspond with the folder you created for your new Git repository on
your local drive. Check the box next to your projectâs line item in the list,
then click Finish.
11. 6. In the Mule Studio Package Explorer, notice the small question mark icon
that appears next to your project name (below). This icon indicates that
you have created a Git repository for your project on your local drive, but
you have not yet registered it and are not yet tracking changes to the
project.
12. Registering a Local Repository
Please find the steps shows below how to register a local repository
1. In the Package Explorer, right click the name of your project, navigate
to Team, then select Commit.
- To be contdâŠ
13. If you have not yet identified yourself to Git as a user, the Identify
Yourself panel may appear at this point. Enter a User name and User e-
mail that Git can use to identify you and the commits that you make to your
Git repository.
14. 2. In the Commit Changes panel, commit the inaugural version of your
Studio project which will effectively register the project on your local
drive. In the Commit message field, enter a description of the project you
are about to commit to the repository. (In the future, when you commit
changes to the project to your repository, use the Commit message field to
record the changes that you have made to the project since your last
commit.)
15. 3. In the Files pane, notice that Mule has applied a question mark icon to
each of the items in the list. This icon indicates that the file is "untracked"
in Git (i.e. the file has not yet been saved in the repository). Click the
checkbox next to each item to select all of them
16. 4. Click Commit to save your project in your new Git repository
5. In the Package Explorer, notice that Mule applies a barrel icon to your
project name (below). This icon indicates that you have committed this
project to a Git repository.
17. Committing Changes to the Local Repository
After making changes to your Studio project and saving in Mule, you can
commit changes to the project in your local Git repository.
1. First, save the changes you have made to your Studio project in Mule
(File > Save).
2. In the Package Explorer, notice that Mule applies a chevron in front of
your project name (below). This icon indicates that you have made
changes to your Studio project but have not yet committed those changes
to your Git repository.
3. In the Package Explorer, right click the name of your project, go to Team,
and select Commit.
18. 4. In the Commit message field of the Commit Changes panel, enter notes to
describe what you have added or changed in the Studio project.
5. Click the box next to all items listed in the Files pane, then
click Commit to save your changes to your local Git repository.
19. Committing and Pushing to a Remote Repository
When multiple people work on a Studio project, they must all synchronize
changes through the a remote Git repository. Within Studio, you can push your
latest commits to a project to the remote Git repository.
1. If your project is already being tracked on a remote Git repository, you
must first Cloning and Pulling from a Remote Repository of your project
from the remote repository before proceeding to step 2. This ensures that
the commits you are about to push contain all the project changes that
others have previously committed to the remote repository
2. Follow the steps above to commit your changes locally.
3. In the Package Explorer, right-click the name of your project, navigate to
Team, then select Push to Upstream.
20. 4. Mule pushes your commits to the remote Git repository, then presents a
Push Results panel that describes the commits you have pushed. Click
OK
21. Importing a Git Project into Studio
Studio offers two ways to import a project from a Git repository:
a. If you have already cloned your Git repository and stored it on your local
drive, follow the procedure for Importing a Project from a Local Drive.
b. If you have not yet cloned your Git repository and stored it on your local
drive, follow the procedure for Importing From a Remote Repository
22. Importing from a Local Drive
1. In Studio, under the File menu, select Import
2. In the Import wizard, click the expand arrow next to the Git folder, then
select Projects from Git.
3. Click Next to continue.
23. 4. In the Import Projects from Git wizard, select Local, then click Next.
5. Click to select a Git repository from the list of repositories on your local
drive, then click Next.
6. Select Import existing projects from the list of import methods, then click
to select the Working Directory folder
7. Click next
24. 8. Use the drop-down menu in the Working sets field to select the project
you wish to import, then click Finish.
9. Known Issue: Under the Projects menu, select Clean to scrub the project
and ensure that Studio has created a consistent build path.
10. Under the File menu, select Openâ, then navigate to the cloned repository
on your hard drive to open your project and work with it in Studio.
25. Importing From a Remote Repository
1. In Studio, under the File menu, select Import
2. In the Import wizard, click the expand arrow next to the Git folder, then
select Projects from Git.
3. Click Next to continue.
26. 4. In the Import Projects from Git wizard, select URI, then click Next.
5. In the URI field, identify your user name and the name of your Git
repository. Use the following format to enter the
information:git@github.com:username/repository-name.git. When you
enter this information, Studio automatically completes the remaining
required fields in the panel.
27. 6. In the list of branches in your Git repository, click the boxes next to the
branch (or branches) of your project that you wish to check out and work
on in Studio.
7. Click Next to continue.
8. Select the directory on your local drive to which you want to clone and
save your project, then click Next. Git clones the branch(es) you selected
and stores them on your local drive.
9. Select Import existing projects from the list of import methods, select the
working Directory folder, then click Next
28. 10. Use the drop-down menu in the Working sets field to select the project
you wish to import, then click Finish.
11. Known Issue: Under the Projects menu, select Clean to scrub the project
and ensure that Studio has created a consistent build path
12. Under the File menu, select Open then navigate to the cloned repository
on your hard drive to open your project and work with it in Studio.
29. Cloning and Pulling from a Remote Repository
For multiple people to collaborate on a Studio project, everyone must
synchronize their changes through a remote Git repository. To work on your
project locally within Studio, clone, then pull the latest version of a project
from a remote Git repository.
1. In Studio, close all the Message Flow tabs of the project you are about to
pull from your remote Git repository.
2. In Package Explorer, right-click the name of your project, navigate
to Team, then select Pull
3. Mule pulls the project from the remote repository, then it presents a Pull
Result panel that describes the changes others have made to the project
since your last pull.
30. 5. Click OK.
6. In Package Explorer, double-click the name of the flow(s) in your project
to reopen them on your Studio canvas.