Use Git with SourceTree and Eclipse

Use Git with SourceTree and Eclipse

This goal

Clone a remote Git repository locally so you can edit it in Eclipse (you can see your edits in Eclipse from SourceTree)

Advance preparation

Install SourceTree and Eclipse

This execution environment

OS:Windows7 SourceTree:1.6.23.0 Eclipse:4.4.2

Implementation procedure

  1. Remote repository clone
  2. Register your local Git repository in Eclipse
  3. Push to remote repository

1. Remote Git clone

Open SourceTree and clone from the URL of the remote repository to the local environment

Qiita用SourceTree.png

2. Register local Git in Eclipse

2-1. Add Git from "Open Perspective" 2-2. Select "Add an existing local Git repository" and specify the local repository cloned in step 1. 2-3. Change the perspective (Java this time), right-click in Package Explorer → select Import 2-4. Select "Select Import Source"-> "Git"-> "Project from Git" and click "Next (N)>" 2-5. After selecting "Existing Local Repository", click "Next (N)>" 2-6. The local repository added in step 2-2. Should be displayed. Select it and click "Next (N)>". 2-7. Import existing project (E) → Click "Next (N)>", check the "Project" you want to import, and click "Finish". The project will be added

Qiita用Git_1.png

Qiita用_git_project.png

3. Push to remote

When editing a file in a project with Eclipse etc., the edited file is displayed by selecting "File Status"-> "Working Copy" in SourceTree. When you reach that point, commit, push, etc. as appropriate.

Recommended Posts

Use Git with SourceTree and Eclipse
Use SDKMAN! With Git Bash
Use java with MSYS and Cygwin
Use JDBC with Java and Scala.
I want to use DBViewer with Eclipse 2018-12! !!
Mock and stub with minitest (use RR, WebMock, MiniTest :: Mock)
How to use Eclipse on my PC with 32bit and 2GB of memory
Use ProGuard with Gradle
Use Puphpeteer with Docker
Use XVim2 with Xcode 12.0.1
Use CentOS with LXD
Use ngrok with Docker
Use webmock with Rspec
How to use JDD library in Scala with Eclipse
How to use RealSense with ubuntu 20.04 and ROS Noetic
Use WebJars with Gradle
Use jlink with gradle
[Personal memo] Link between Eclipse and git (github) Reference link
[PHP8] Install and use PECL YAML function (YAML parser) with Docker
Use Lambda Layers with Java
Use GDAL with Python with Docker
Use Thymeleaf with Azure Functions
URLSession with URLSession and Combine normally
Use Bulk API with RestHighLevelClient
Use swift Filter and Map
Use multiple databases with Rails 6.0
How to use Eclipse Debug_Shell
Use Spring JDBC with Spring Boot
Connect to oracle with eclipse!
Use Ruby with Google Colab
Use SpatiaLite with Java / JDBC
Use log4j2 with YAML + Gradle
[Docker] Use whenever with Docker + Rails
Steps to install Maven on Mac and use it in Eclipse