Git502023-10-22 16:01:43crose492023-10-22 15:59:58crose482023-10-22 15:57:17crose472023-10-22 15:56:48crose462023-10-22 15:54:36crose`452023-09-02 12:26:59crose442023-04-14 11:24:39crose432023-04-14 11:07:50crose422021-02-03 09:39:33eseide412021-02-03 09:37:52eseide402021-02-03 09:35:38eseide392021-02-03 09:27:22eseide382021-02-03 09:26:58eseide372020-05-02 09:19:13crose362020-05-02 09:18:50crose352020-05-02 09:18:15crose342020-05-02 09:16:24crose332020-05-02 09:16:09crose322020-05-02 09:15:26crose312020-05-02 09:14:38crose302020-05-02 09:13:30crose292020-03-23 11:04:47crose282020-03-23 11:04:29crose272020-03-23 11:02:26crose262019-10-01 11:25:13megger252019-06-25 08:38:27bbaer242019-06-14 14:43:37bbaer232018-11-09 14:26:35crose222018-11-09 14:26:07crose212018-11-09 14:25:04crose202018-03-15 19:48:27crose192018-03-15 19:48:11crose182017-12-03 21:44:43crose172015-03-06 15:23:17crose162015-03-06 15:03:10crose152015-03-06 14:59:34crose142015-03-06 14:54:37crose132015-03-02 07:31:34crose122014-11-25 13:14:54crose112014-11-23 16:52:36crose102014-11-23 15:57:50crose92013-07-23 13:20:15sericm82013-07-23 13:17:54sericm72013-07-23 13:17:42sericm62013-07-23 13:17:20sericm52013-07-23 13:08:27sericm42013-07-23 13:02:16sericm32013-07-23 12:58:49sericm22013-07-23 12:57:45sericm12013-07-23 12:57:15sericmServer Server Info
Software Gitlab
Git push/pull access mainly via SSH over git@git.math.uzh.ch
- do not forget to upload your public ssh key
Cheat sheet GIT for SVN users
PrerequisitesGit installed (already done on IMATH server). SSH KeysTo work with private GIT repos or to commit files, it's necessary to identify yourself. This is done via SSH Keys. Do this on all devices which you like to use with the GIT server (and in your I-MATH thinlinc session if you use it). Setup SSH keys (per device) - HowTo create private/public ssh keys Linux: On your device/session, push the keys to your ssh-agent Do a test: Via ssh: ssh -T git@git.math.uzh.ch
(do not replace git
with your username, use git@git.math.uzh.ch as written). By cloning a repo. Git accountFor members of I-MATHUse your regular 'I-MATH' account to login. > Tab 'MATH User' For members of UZH (not I-MATH)Open your I-MATH account (based on your UZH Webpass account) under > Tab 'MATH User' For non UZH personsIf you like to collaborate on a project which is hosted on , you have to request a git.math.uzh.ch account. Best is to ask a project member affiliated with I-MATH to request the account via . You will then receive an email for validation and first-time login. > Tab 'Standard' After the first-time loginIf 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. Managing your Projects with GitlabGitlab has quite extensive managing capabilities. You can, among other things, Crate/fork/rename/remove projects Create/delete/join Teams Assign members with roles to projects Create/Assign issues Have a wiki for a project The gitlab user documentation is found on https://git.math.uzh.ch/help
. GIT Best PracticeNew project from scratchCreate a new project via the webinterface. git.project.png You'll see a summary with the next steps:
cd
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin git@git.math.uzh.ch:.git
git push -u origin master
]]>.git
git push -u origin master]]>GIT daily useLocal: Add new files to existing repo]]>Local: Work on your filesCommit changes locally Or at IMATH you can use git-commit
, which will in every file replace $Id$
by User/timestamp: Commit changes remote Local: clone an existing repo to start working on it.git]]>Purged Remote branches still shown locallySee: Purge a file completely from all commits & branchesThis is not how GIT should be used! ONLY, ONLY, ONLY do this if it is absolutly necessary! There might be side effects, you're on your own! Source:
$ git-forget-file.sh /]]>Overwrite local branch with remote Visually show commit historygitg
Use the git.math.uzh.ch webinterface Search the commit which breaks somethingBased on binary search. Give a good and a bad commit. The git bisect ...
command always looks for the commit in the middle. Do a check of such a commit and decide to continue the search in the lower or upper half. Mac OS Xgit: xcrun missingBy using git
the following error is shown: Open a terminal and install xcode
: a pop up have to acknowledged. UmlauteMacOS X uses a different UTF8 encoding for filenames than MS-Windows and Linux. This leads to confusion. E.g.: after a fresh clone of a GIT repo (created on MS-Windows or linux) a git status
will show untracked files if they contain umlaut in their filenames, even without any change has been done! To fix this, one option is to change the handling of filenames in the local git configuration: After that, clone the repository again. FAQChange Repo: http > sshAttention: if you change to SSH and You use SSH public key (stored on GIT server), You're logged in on a remote server by ssh and you're using a different user ID than the one where the public key on the git server belongs to, than you should forward your SSH-Agent! E.g. ssh root@host -A Pipeline failed notificationMaintainer receives all pipeline errors per mail by default screen_gitlab_error.png Others can subscribe to it on the main site of a project: setting_notifaction.png Windows Change Saved Git PasswordOpen "Credential Manager" (German: "Anmeldeinformationsverwaltung") 01_credential_manager.png Choose "Windows Credentials" (German: "Windows-Anmeldeinformationen") and remove all saved credentials for Git. 02_windows_credentials.png Use git as usual, you will be asked to enter your password