Difference between revisions of "Git usage"

From Planets
Jump to: navigation, search
(addition of git related commands)
 
(git configuration)
Line 23: Line 23:
  
 
== git configuration ==
 
== git configuration ==
You can configure git to get useful shortcuts via the addition of the .gitconfig in your home directory. Example:
+
You can configure git to get useful shortcuts via the addition of the ''.gitconfig'' file in your home directory. Example below (replace all <text> by your own):
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
[user]
 
[user]
name = Titi Toto
+
name = <Titi Toto>
email = titototo@gmail.com
+
email = <titototo@gmail.com>
  
 
[alias]
 
[alias]
Line 47: Line 47:
 
[credential]
 
[credential]
 
helper = store
 
helper = store
username=falco
+
username=<username>
 
[color]
 
[color]
 
ui = auto
 
ui = auto

Revision as of 12:31, 4 April 2024

This page is a guide to use the git repository correctly.

Access

First of all, you will probably need to connect via the "CC-IN2P3 single sign on" button and your institutional account ("EDUGAIN"). You can then either clone the git repository via SSH:

git clone git@gitlab.in2p3.fr:la-communaut-des-mod-les-atmosph-riques-plan-taires/git-trunk.git

or via https if you do not have an ssh key and will not require to push often/do not want to.

git clone https://gitlab.in2p3.fr/la-communaut-des-mod-les-atmosph-riques-plan-taires/git-trunk.git

Simple commands

As for svn, git is used to fetch remote changes from the repository:

git pull

git configuration

You can configure git to get useful shortcuts via the addition of the .gitconfig file in your home directory. Example below (replace all <text> by your own):

[user]
	name = <Titi Toto>
	email = <titototo@gmail.com>

[alias]
	br = branch
	ci = commit
	co = checkout
	ph = push
	pl = pull --rebase
	pll = merge --ff-only
	list = ls-tree --name-only HEAD
	ls = log --no-decorate --graph --abbrev-commit --pretty=format:'%ar %h - %an: %s'
	st = status
	stt = status .
[push]
	default = matching
[http]
	sslVerify = false
[credential]
	helper = store
	username=<username>
[color]
	ui = auto
[cola]
	spellcheck = false

Issues

You can track issues on the issues page.