Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "WTP Git Workflows OLD"

(Created page with "= Clone a repo = The first step is to clone the one or more repos you need to work on. You want to clone the repo to a location ''outside'' your workspace. Then use the '''E...")
 
Line 47: Line 47:
 
#an initial branch of '''master''' and a remote name of '''origin''' are standard.  
 
#an initial branch of '''master''' and a remote name of '''origin''' are standard.  
 
#''Finish'' - Now just sit back while git copies the entire repo to your harddrive :-)
 
#''Finish'' - Now just sit back while git copies the entire repo to your harddrive :-)
 
== Configuring the repo  ==
 
 
Unless you are working on topic branches, we work in a fairly linear history. Please set branch.'''branchname'''.rebase = true (see instructions below).
 
 
Make sure that you set '''core.autocrlf=false''' and on Windows '''core.filemode=false'''. If you use EGit to clone the repository then this is done automatically for you.
 
 
Once you've cloned a repository, you can go to the '''Preferences > Team > Git > Configuration''' page. Select your repository, select the branch you picked when you cloned the repository and click '''New Entry...'''. Append "rebase" to the text in the 'Key' field and enter "true" as value.
 
 
[[Image:RepositoryConfigurationSettings.png]]
 
 
To automate the setting of "branch.'''branchname'''.rebase = true" if you use command line git, add "branch.autosetuprebase = always" to your global user settings. Unfortunately, this does not yet work properly in EGit, see [https://bugs.eclipse.org/345536 Bug 345536] (fixed in EGit nightly build).
 
 
== Importing the projects  ==
 
 
We need to get the projects from the repo into our workspace:
 
 
#right click on your newly cloned repo and select '''Import Projects'''
 
#you want '''Import existing projects''' from the ''Working Directory''
 
#''Next''
 
#Select the projects that you want to import from the repository
 
#''Finish''
 
 
Now you can start working.
 
 
== A note on deleting projects  ==
 
 
Typically you will only want to have a subset of the projects from a given repository in your workspace. When you are no longer interested in a project, you can delete it from your workspace. However, '''NEVER select 'Delete project contents on disk'''' for a project in a git repository. If you do, Git will consider this an outgoing deletion to be committed to the remote branch. Later while working on a completely unrelated project you may accidentally commit this deletion (and you wouldn't be the first to do so).
 

Revision as of 15:22, 15 June 2017

Clone a repo

The first step is to clone the one or more repos you need to work on. You want to clone the repo to a location outside your workspace. Then use the EGit Import Projects option to import the projects.

Refer to the EGit/User Guide for more detailed instructions and pictures.

  1. Switch to the Git Repository Exploring Perspective
  2. Use Clone a Git repository Clone a git repository
  3. you can paste in your connection URL and it should do the right thing. Some URLs (not all of them contain content right now in the testing phase). The repos that have been migrated are in bold text:
    1. ssh://userid@git.eclipse.org/gitroot/webtools-common/webtools.common.git
    2. ssh://userid@git.eclipse.org/gitroot/webtools-common/webtools.common.fproj.git
    3. ssh://userid@git.eclipse.org/gitroot/webtools-common/webtools.common.snippets.git
    4. ssh://userid@git.eclipse.org/gitroot/webtools-common/webtools.common.tests.git
    5. ssh://userid@git.eclipse.org/gitroot/jeetools/webtools.javaee.git
    6. ssh://userid@git.eclipse.org/gitroot/jeetools/webtools.javaee.tests.git
    7. ssh://userid@git.eclipse.org/gitroot/jeetools/webtools.ejb.git
    8. ssh://userid@git.eclipse.org/gitroot/jsf/webtools.jsf.git
    9. ssh://userid@git.eclipse.org/gitroot/jsf/webtools.jsf.docs.git
    10. ssh://userid@git.eclipse.org/gitroot/jsf/webtools.jsf.tests.git
    11. ssh://userid@git.eclipse.org/gitroot/dali/webtools.dali.git
    12. ssh://userid@git.eclipse.org/gitroot/servertools/webtools.servertools.git
    13. ssh://userid@git.eclipse.org/gitroot/servertools/webtools.servertools.devsupport.git
    14. ssh://userid@git.eclipse.org/gitroot/servertools/webtools.servertools.docs.git
    15. ssh://userid@git.eclipse.org/gitroot/servertools/webtools.servertools.tests.git
    16. ssh://userid@git.eclipse.org/gitroot/webservices/webtools.webservices.git
    17. ssh://userid@git.eclipse.org/gitroot/webservices/webtools.webservices.axis2.git
    18. ssh://userid@git.eclipse.org/gitroot/webservices/webtools.webservices.jaxws.git
    19. Starting from WTP 3.6 the JSDT repositories are merged into one single repository, so:
      1. Use the following repository for the current development (master branch) and any maintenance of WTP 3.6 and later (starting from R3_6_maintenance branch):
        1. ssh://userid@git.eclipse.org/gitroot/jsdt/webtools.jsdt.git
      2. Use the following set of repositories for maintenance of WTP versions equal or older than 3.5 (the latest branch is R3_5_maintenance, master branch of these repositories is closed for write operations):
        1. ssh://userid@git.eclipse.org/gitroot/jsdt/webtools.jsdt.core.git
        2. ssh://userid@git.eclipse.org/gitroot/jsdt/webtools.jsdt.debug.git
        3. ssh://userid@git.eclipse.org/gitroot/jsdt/webtools.jsdt.tests.git
    20. ssh://userid@git.eclipse.org/gitroot/sourceediting/webtools.sourceediting.git
    21. ssh://userid@git.eclipse.org/gitroot/sourceediting/webtools.sourceediting.tests.git
    22. ssh://userid@git.eclipse.org/gitroot/sourceediting/webtools.sourceediting.xpath.git
    23. ssh://userid@git.eclipse.org/gitroot/sourceediting/webtools.sourceediting.xpath.tests.git
    24. ssh://userid@git.eclipse.org/gitroot/sourceediting/webtools.sourceediting.xsl.git
    25. ssh://userid@git.eclipse.org/gitroot/sourceediting/webtools.sourceediting.xsl.tests.git
    26. ssh://userid@git.eclipse.org/gitroot/webtools/webtools.releng.aggregator.git
    27. ssh://userid@git.eclipse.org/gitroot/webtools/webtools.maps.git
  4. Next
  5. Select all branches to clone
  6. Next
  7. Confirm the location that it will clone the repository into.
  8. an initial branch of master and a remote name of origin are standard.
  9. Finish - Now just sit back while git copies the entire repo to your harddrive :-)

Back to the top