Accessible site navigation tree
Click for DARTS Sitemap or Sitemap Text
Setting up Gitlab:
- Sourcetree: client for gitlab
- Link to gitlab: https://gitlab.its.maine.edu/users/sign_in
- Click on UMS Single sign-on:
- Enter your credentials and you are in!
Create Gitlab personal access token:
- Log in with UMS account
- Click settings on the upper right corner
- Select access tokens from the User Settings
- Create a new personal access token by giving it a name. Select "Scopes", but the expiry date is optional.
- Click the create personal access token button
- Copy the personal access token in a notepad. Don't forget to save the token, or you won’t be able to access it again one the page is refreshed or closed.
SourceTree for Gitlab:
- Obtain Sourcetree from here: https://www.sourcetreeapp.com/
- Download "Server" version of Sourcetree (if you haven't done so.)
- Create a Bitbucket account when prompted with UMS credentials.
- Open Sourcetree application and click on Add an account.
- Hosting Service: choose "gitlab EE"
- host URL: https://gitlab.its.maine.edu/
- Preferred Protocol: SSH
- Click "refresh personal access token"
- You will get a popup window that says, enter your username and password
- Enter your username
- Enter personal access token (from the previous step) as your password
- If login succeeds, you will see "Authentication OK"
- Once gitlab is intergrated with Sourcetree, you will see the following screen:
- Delete "Bitbucket" account since you will not use it.
Back to top
Git for Windows:
- Go to https://gitforwindows.org/ and click download
- Check all boxes and click 'Next'
- Pick whichever you like (If you prefer UltraEdit, select other) and click 'Next'.
- Pick "Git form the command line and also from 3-rd party software" and click 'Next'.
- Pick "Use the OpenSSL library" and click 'Next'.
- Pick "Checkout as-is, commit as-is" and click 'Next'.
- Pick "Use MinTTY (the default terminal of MSYS2)" and click 'Next'.
- Click the first two boxes and click 'Install'. Wait for a couple of minutes.
- Click "Launch Git Bash" box and click "Finish"
- You will see new window for Git Bash.
Git Command Line Instructions:
The following commands will help upload existing files from your local machine
Git global setup
git config --global user.name "your user.name"
git config --global user.email "youremail@maine.edu"
Create a new repository
git clone git@gitlab.its.maine.edu:YourUserName/YourNewProject.git
cd YourNewProject
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
cd existing_folder
git init
git remote add origin git@gitlab.its.maine.edu:YourUserName/ExistingProject.git
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.its.maine.edu:YourUserName/ExistingProject.git
git push -u origin --all
git push -u origin --tags
Git Workflow commands
git init //initialize a folder to git
git add filename //move the file from unstaged to staged
git rm --cached filename //moves it from staged to unstaged
git reset filename //moves it from staged to unstaged
git add . //will add all files under current directory
git add --all //find all new and updated files everywhere throughout the project and add them to the staging area
Powershell/Linux commands
ls //list non-system files in directory
ls -a //lists all folders and files
cd folder //changes directory into a folder
cd .. //going one level up in folder structure
mkdir folder //makes a directory
Overview
Content Tools