location: Diff for "Git"

Institute of Mathematics - PublicMathWiki:

Differences between revisions 3 and 16 (spanning 13 versions)
Revision 3 as of 2013-07-23 12:58:49
Size: 963
Editor: sericm
Comment:
Revision 16 as of 2015-03-06 15:03:10
Size: 2487
Editor: crose
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
  * Cheat sheet: [[http://www.git-tower.com/blog/git-for-subversion-users-cheat-sheet/|GIT for SVN users]]
Line 21: Line 22:
=== After the first-time login === = After the first-time login =
Line 23: Line 24:
 * '''Recommended''': You need to provide your public SSH key. This can easily be done on the Gitlab web-interface.
Line 24: Line 26:
 * You need to provide your public SSH key. This can easily be done on the Gitlab web-interface. = Login to Gitlab on `git.math.uzh.ch` =
|| '''For Members of I-MATH''' || choose 'LDAP login' ||
|| '''For Non-Members of I-MATH''' || choose 'External login' ||

= Working with Git =
{{{
git COMMAND git@git.math.uzh.ch/<username>/<projectname>
}}}

= Managing your Projects with Gitlab =
Gitlab has quite extensive managing capabilities.

 * You can, among other things,
   * Crate/fork/rename/remove projects
   * Create/delete/join Teams
   * Assing members with roles to projects
   * Create/Assing issues
   * Have a wiki for a project

 * The gitlab user documentation is found on `https://git.math.uzh.ch/help`.

= GIT Best Practise =
== From scratch ==
 * Create a new project via the webinterface.
{{attachment:git.project.png}}
 * You'll see a summary with the next steps:
{{{
Git global setup
----------------
git config --global user.name "First Lastname"
git config --global user.email "email@math.uzh.ch"

Create a new repository
-----------------------
mkdir <local projektdir>
cd <local projektdir>
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin git@git.math.uzh.ch:<project>.git
git push -u origin master

Push an existing Git repository
-------------------------------
cd existing_git_repo
git remote add origin git@git.math.uzh.ch:<project>.git
git push -u origin master
}}}

Server

Server Info

git.math.uzh.ch

Software

Gitlab

Git push/pull access

mainly via SSH over git@git.math.uzh.ch

Prerequisites

You need the following software:

  • Git

  • An SSH keypair.

Create/Request an account

For Members of I-MATH

  • You don't need to request a special account for Gitlab.

For Non-Members of I-MATH

If you wan't to collaborate with a project which is hosted on git.math.uzh.ch, you need to request a special Gitlab account. It's best if you write an email with a request to 'support AT math.uzh.ch'.

You will then receive an email for validation and first-time login.

After the first-time login

  • If you requested an "external" account, you will be asked to change your initial password.
  • Recommended: You need to provide your public SSH key. This can easily be done on the Gitlab web-interface.

Login to Gitlab on `git.math.uzh.ch`

For Members of I-MATH

choose 'LDAP login'

For Non-Members of I-MATH

choose 'External login'

Working with Git

git COMMAND git@git.math.uzh.ch/<username>/<projectname>

Managing your Projects with Gitlab

Gitlab has quite extensive managing capabilities.

  • You can, among other things,
    • Crate/fork/rename/remove projects
    • Create/delete/join Teams
    • Assing members with roles to projects
    • Create/Assing issues
    • Have a wiki for a project
  • The gitlab user documentation is found on https://git.math.uzh.ch/help.

GIT Best Practise

From scratch

  • Create a new project via the webinterface.

git.project.png

  • You'll see a summary with the next steps:

Git global setup
----------------
git config --global user.name "First Lastname"
git config --global user.email "email@math.uzh.ch"

Create a new repository
-----------------------
mkdir <local projektdir>
cd <local projektdir>
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin git@git.math.uzh.ch:<project>.git
git push -u origin master

Push an existing Git repository
-------------------------------
cd existing_git_repo
git remote add origin git@git.math.uzh.ch:<project>.git
git push -u origin master

PublicMathWiki: Git (last edited 2024-11-17 16:00:07 by crose)