EGit recommends not to create Git repositories within Eclipse project or Eclipse workspace. According to EGit user guide :. Also check out how to specify a custom git repository location without any IDE. As I have git distribution installed externally, eclipse has imported some of the configurations from there.
In configuration folder my global user config tutorial are automatically imported:. If you don't already have "email' and "name" entries as seen above, then you need to add them manually. Also check out tutorial on git configuration. That will open 'Configure Git Repository' dialog if you have other version systems installed as well, then you will have a selection dialog first, select Git there :. Click on Create In the next dialog, you can select the repository location.
I'm going to use the default one. Now we have created the git repository for our project already. You will see '? Note that after creating repository for our project a new file '.
This file is created by EGit. According to Git specifications this file should specify intentionally untracked files that Git should ignore more info. EGit added just one entry to. Now let's open some EGit provided views which we will be working with in this example. We can also use right click menu. The ignored files will disappear from the 'Unstaged Changes' tab.
Now the file will show up in 'Stage Changes' tab and in navigator the added file will show plus overlay icon:. Before you can share the results of your work by pushing your changes to the upstream , you need to synchronize with the remote repository to make sure your local copy of the project is up to date. You can do this in one of the following ways: fetch changes , pull changes , or update your project.
The Git branches popup indicates whether a branch has incoming commits that have not yet been fetched:. When you fetch changes from the upstream, all new data from commits that were made since you last synced with the remote repository is downloaded into your local copy.
This new data is not integrated into your local files, and changes are not applied to your code. Fetched changes are stored as a remote branch, which gives you a chance to review them before you merge them with your files.
Since fetch does not affect your local development environment, this is a safe way to get an update of all changes to a remote repository. To fetch changes, from the main menu choose Git Fetch. Use update if you need to sync a specific branch with its remote tracked branch. This is a convenient shortcut for fetching and subsequently applying changes to the selected branch.
In the Branches popup or in the Branches pane of the Version Control tool window , select a branch and choose Update from the context menu. If you need to get changes into the current branch from another branch instead of its remote tracked branch, use pull. When you pull , you not only download new data, but also integrate it into your local working copy of the project. Forum: Other Build Tools. What's the right way to update your maven project in eclipse after a git pull.
Ben Synes. Optional 'thank-you' note:. So, can I ask, after doing a git pull, on the command line, whats the best way for me to update any new maven dependencies, refresh the project, and ensure its up to date. It seems to me each time I get different results and have to re-run them a couple of times sometimes to see the updates, or even radically close and reopen the project.
Here is the typical routine I use: 1. Do a git pull 2. Refresh the project 3. In the project directory, mvn clean install -D skipTests Look, Im fairly new to all of this, so this may well be completely wrong, more than likely its very wrong, I just want the correct minimal amount of steps to ensure my project in the IDE is showing the up to date artefacts, and dependecncies etc. Sorry again, as a newbie, I hope this isnt too embarrassing a question, and I did google it before I posted it!
But to no avail Ron Wheeler. I like
0コメント