Codeguide
Codeguide
Introduction of GitLab
A complete open-source DevOps platform
Gain visibility and insight into how your business is performing
Regardless of your process, GitLab provides powerful planning tools to keep everyone
synchronized
Security capabilities, integrated into your development lifecycle
GitLab of IHEP
GitLab URL : http://code.ihep.ac.cn
Helpdesk : http://helpdesk.ihep.ac.cn
Client Tools
1. Independent client tools (simplified git daily operation, fast start)
TortoiseGit
SourceTree
Xcode
Eclipse – Egit
Visual Studio – Git Integration & GitHub Extension
Visual Studio Code
Introduction of SourceTree
SourceTree URL: https://www.sourcetreeapp.com
1. Create project
2. Client connection
3. Clone a remote repository
4. Code commit
5. Code push
6. Code pull
1. Create Project
Authority
commands
If you would like to use git command, GitLab shows command line instructions.
Members
Users can be members of multiple groups and projects. The following access levels are -
available
o Guest
o Reporter
o Developer
o Maintainer
o Owner
2. Client connection
Client connection SSH key
If you are a project member, you can use this method to get and push operations without
verifying the account.
Generate an SSH Key on Windows, The most straight forward option is to utilize Git Bash.
A public key and a private key should be created. The name of public key is id_rsa.pub.
In SourceTree Tools > Options > General > SSH Client Configuration, input Full Name and
Email address, point SSH Key to the id_rsa key, and select OpenSSH as the SSH Client.
If you have an existing remote repository on GitLib, you need to copy or clone it to your
computer with SourceTree. Test to clone a project with SSH key.
Click the clone button, then you will see the repository below.
4. Code commit
Understand how to run basic Git operations like commit in SourceTree.
Tips:
Commit only put the changes to local repository,others can’t see the code you
modified.
The git push command is used to upload local repository content to a remote repository.
Pushing is how you transfer commits from your local repository to a remote repo.Before
push your code you must submit first.
5. Code push
6. Code pull