<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.neuro.mcw.edu/meg/index.php?action=history&amp;feed=atom&amp;title=Using_GitLab</id>
	<title>Using GitLab - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.neuro.mcw.edu/meg/index.php?action=history&amp;feed=atom&amp;title=Using_GitLab"/>
	<link rel="alternate" type="text/html" href="https://www.neuro.mcw.edu/meg/index.php?title=Using_GitLab&amp;action=history"/>
	<updated>2026-05-18T23:53:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://www.neuro.mcw.edu/meg/index.php?title=Using_GitLab&amp;diff=21&amp;oldid=prev</id>
		<title>Colin: Created page with &quot;==Introduction==  In this page you will find information on how to use gitlab in general and for our Epilepsy project in particular. Gitlab is a web based Git repository that...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.neuro.mcw.edu/meg/index.php?title=Using_GitLab&amp;diff=21&amp;oldid=prev"/>
		<updated>2019-05-24T20:16:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Introduction==  In this page you will find information on how to use gitlab in general and for our Epilepsy project in particular. Gitlab is a web based Git repository that...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
In this page you will find information on how to use gitlab in general and for our Epilepsy project in particular. Gitlab is a web based Git repository that provides an opportinty to develop a streamlined project workflow. It is a cloud based sharing center where users working on the same code can compare, develop, pull and push code to the master repository. &lt;br /&gt;
&lt;br /&gt;
== Git Useful Links ==&lt;br /&gt;
# [https://www.git-tower.com/blog/git-cheat-sheet/ Cheat sheet]&lt;br /&gt;
# [http://longair.net/blog/2009/04/16/git-fetch-and-merge/ Git Fetch &amp;amp; Merge]&lt;br /&gt;
&lt;br /&gt;
==Steps to create a gitlab repo==&lt;br /&gt;
&lt;br /&gt;
Go to the git lab login page and create a project. If you already have files you can push them using command line instructions below. Otherwise you can start with adding a README, a LICENSE, or a .gitignore to this project. You will need to be owner or have the master permission level for the initial push, as the master branch is automatically protected.&lt;br /&gt;
&lt;br /&gt;
===Command line instructions===&lt;br /&gt;
&lt;br /&gt;
====Git global setup====&lt;br /&gt;
&lt;br /&gt;
 git config --global user.name &amp;quot;C Ustine&amp;quot;&lt;br /&gt;
 git config --global user.email &amp;quot;custine@mcw.edu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Create a new repository====&lt;br /&gt;
&lt;br /&gt;
 git clone git@gitlab.com:candidaustine/Name_Of_Project.git&lt;br /&gt;
 cd Name_Of_Project&lt;br /&gt;
 touch README.md&lt;br /&gt;
 git add README.md&lt;br /&gt;
 git commit -m &amp;quot;add README&amp;quot;&lt;br /&gt;
 git push -u origin master&lt;br /&gt;
&lt;br /&gt;
====Existing folder====&lt;br /&gt;
&lt;br /&gt;
 cd existing_folder&lt;br /&gt;
 git init&lt;br /&gt;
 git remote add origin git@gitlab.com:candidaustine/Name_Of_Project.git&lt;br /&gt;
 git add .&lt;br /&gt;
 git commit -m &amp;quot;Initial commit&amp;quot;&lt;br /&gt;
 git push -u origin master&lt;br /&gt;
&lt;br /&gt;
====Existing Git repository====&lt;br /&gt;
&lt;br /&gt;
 cd existing_repo&lt;br /&gt;
 git remote add origin git@gitlab.com:candidaustine/Name_Of_Project.git&lt;br /&gt;
 git push -u origin --all&lt;br /&gt;
 git push -u origin --tags&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic GitLab commands==&lt;br /&gt;
Go to the master branch to pull the latest changes from there&lt;br /&gt;
&lt;br /&gt;
 git checkout master&lt;br /&gt;
&lt;br /&gt;
Download the latest changes in the project. This is for you to work on an up-to-date copy (it is important to do every time you work on a project), while you setup tracking branches.&lt;br /&gt;
&lt;br /&gt;
 git pull REMOTE NAME-OF-BRANCH -u &lt;br /&gt;
 (Ex: git pull origin develop-v1)&lt;br /&gt;
(REMOTE: origin) (NAME-OF-BRANCH: could be &amp;quot;master&amp;quot; or an existing branch)&lt;br /&gt;
&lt;br /&gt;
Create a branch. Spaces won't be recognized, so you need to use a hyphen or underscore.&lt;br /&gt;
&lt;br /&gt;
 git checkout -b NAME-OF-BRANCH&lt;br /&gt;
&lt;br /&gt;
Work on a branch that has already been created&lt;br /&gt;
&lt;br /&gt;
 git checkout NAME-OF-BRANCH&lt;br /&gt;
&lt;br /&gt;
To List the name of the branch that you are working on&lt;br /&gt;
 git branch &lt;br /&gt;
&lt;br /&gt;
To List the name of the remote&lt;br /&gt;
 git remote &lt;br /&gt;
&lt;br /&gt;
View the changes you've made. It's important to be aware of what's happening and what's the status of your changes.&lt;br /&gt;
&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
Add changes to commit. You'll see your changes in red when you type &amp;quot;git status&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 git add CHANGES IN RED&lt;br /&gt;
 git commit -m &amp;quot;DESCRIBE THE INTENTION OF THE COMMIT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Send changes to gitlab.com&lt;br /&gt;
&lt;br /&gt;
 git push REMOTE NAME-OF-BRANCH&lt;br /&gt;
&lt;br /&gt;
Delete all changes in the Git repository, but leave unstaged things&lt;br /&gt;
 git checkout .&lt;br /&gt;
&lt;br /&gt;
Delete all changes in the Git repository, including untracked files&lt;br /&gt;
 git clean -f&lt;br /&gt;
&lt;br /&gt;
Merge created branch with master branch. You need to be in the created branch.&lt;br /&gt;
&lt;br /&gt;
 git checkout NAME-OF-BRANCH&lt;br /&gt;
 git merge master&lt;br /&gt;
&lt;br /&gt;
===Git ECP===&lt;br /&gt;
We have created a repository of the connectome scripts written and managed for the ECP project. The ECP project is a private repository managed by the ECP MEG team at MCW. &lt;br /&gt;
&lt;br /&gt;
We have currently created two branches of the existing code obtained from the HCP megconnectome database. The &amp;quot;master&amp;quot; branch is our main branch and will only be accessed when we would like to make permanent edits to our code. The developers in the project wil be working on the branch called &amp;quot;develop-v1&amp;quot; which will be our workspace where we store temporary code during trial &amp;amp; development stages. Developers, please pull a copy of the code from the &amp;quot;develop-v1&amp;quot; branch to your workstation to work on the most updated version of the code.&lt;br /&gt;
==== Pull from ECP Repository====&lt;br /&gt;
 git clone git@gitlab.com:candidaustine/epilepsy_megconnectome.git OutputDir&lt;/div&gt;</summary>
		<author><name>Colin</name></author>
	</entry>
</feed>