Git upload an existing project

Starting from our AppHowToProjectSetup manual this explains how to create a new gitea repository and upload the source code.

Please make sure to read AppHowToGitInEclipseForBeginners at least up to and including 2.1.

We will create a project in our personal git organisation which can later be move to one of the bigger organisations like fcc-applications or fcc-commons.

Create the gitea project

Visit https://git.acc.gsi.de/ and Please follow the screenshots.
1. Chose new repository from the "+" menu

Navigate to Gitea (https://git.acc.gsi.de) and press the "+" button on the right side (see screenshot below).

2. Enter you project name and information

01-new-repo-settings.png
  • Owner: Your name
  • Chose a repository name that resembles or even is the same as the maven artifact name
  • Private repository is only if you want to hide the project, none of your collegues will be able to see the project
  • Leave the gitignore, license and especially the "initialize repository" option empty. We already have code that we want to upload and don't want do get any conflict
  • Click to expand "Advanced Settings" and enter dev as default branch
  • Hit "Create Repository"
3. Repository created, copy URL

02-new-repo-success.png
  • Repository created successfully - make sure to copy the marked ssh repository URL. (We highly recommend to use ssh - [[APP/AppHowToGitPrepareSshKey][how to set up the ssh keys is described here] If this is not possible, you can also use the https URL.).
4. Initialize the local git repository

Now we have to do some command line work. Open a bash shell and navigate to the source files of your project. (To get the path, in Eclipse: select Project -> Properties -> Location might help you)

Enter the following commands from the main project directory (were pom.xml is)
cd DIRECTORY_OF_THE_PROJECT
git init
# download a default gitignore file that will prevent eclipse project files from being uploaded
wget https://git.acc.gsi.de/buildsystem-common/csco-java-fx-template/raw/branch/main/.gitignore
# Adjust the complete URL to the previously copied one
git remote add origin https://git.acc.gsi.de/REPLACE_COMPLETE_WITH_THE_URL_YOU_HAVE_COPIED_BEFORE
# Add and commit all these changes with the following commands
git add -A
git commit -m 'Initial commit'
# We will then push the changes using eclipse in the next step
5. Push the repository using eclipse
  1. Now we switch back to eclipse, select our project in the repository explorer and do a "-> refresh" or hit F5 while the project is selected
  2. Select Team -> Push Branch "master"...
    • (highlighted blue in the screenshot below)
    • if you only have the options "Apply patch", "Share Project", and "Share Projects", choose "Share Project", select GIT and finish, repeate step 2
  3. There might be a prompt for your local keystore password, enter it or cancel the keystore dialog
  4. Click on Preview and Push in the following dialog pages
04-push-branch-master.png
6. Success

You can see an entry in your eclipse "history" view now and if you refresh you gitea project page.

05-success-history.png

06-success-gitea.png

-- BenjaminPeter - 2020-01-28
I Attachment Action Size Date Who Comment
01-new-repo-settings.pngpng 01-new-repo-settings.png manage 133 K 2026-04-29 - 09:06 JuttaFitzek 01: Create new repository, edit settings
02-new-repo-success.pngpng 02-new-repo-success.png manage 48 K 2026-04-29 - 09:18 JuttaFitzek 02: Successfully created new repository, copy URL
Please login to edit this topic
Topic revision: r2 - 2026-04-29, JuttaFitzek
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)