Permière version de l'outil
This commit is contained in:
		
						commit
						ab1b562467
					
				
							
								
								
									
										36
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| Je tente de faire des configurations Git différentes pour chacun d'entre nous | ||||
| 
 | ||||
| Installation | ||||
| =========== | ||||
| 
 | ||||
| Se créer un fichier de config (en pompant celui d'Alban par exemple) : | ||||
| 
 | ||||
| 	cp .gitconfig_alban .gitconfig_john | ||||
| 
 | ||||
| Modifier au moins `name` et `email`. | ||||
| 
 | ||||
| 
 | ||||
| Utilisation | ||||
| =========== | ||||
| 
 | ||||
| Simple ! Les scripts sont normalement ajouter dans le $PATH | ||||
| 
 | ||||
| Dans le dépôt git où vous allez travailler : | ||||
| 
 | ||||
| 	git-start alban | ||||
| 
 | ||||
| Quand le job est fini: | ||||
| 
 | ||||
| 	git-stop | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| Pour l'installation de l'outil | ||||
| ============================== | ||||
| 
 | ||||
| Ajout dans le `~/.bashrc` : | ||||
| 
 | ||||
| 	# Pour l'outil git multi-utilisateurs | ||||
| 	PATH=$PATH:/home/pi/git | ||||
| 
 | ||||
							
								
								
									
										24
									
								
								git-start
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										24
									
								
								git-start
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,24 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| if [ "$#" -ne 1 ]; then | ||||
|     echo "Hey man, met ton nom !" | ||||
|     echo "Regarde, comme ça:" | ||||
|     echo "    $0 roberto" | ||||
|     exit | ||||
| fi | ||||
| 
 | ||||
| 
 | ||||
| CONFIG="/home/pi/git/gitconfig_$1" | ||||
| 
 | ||||
| if [ ! -f "$CONFIG" ]; then | ||||
|     echo "Ton fichier de configuration '$CONFIG' n'existe pas. :(" | ||||
|     echo "Va voir dans le dossier ~/git" | ||||
|     exit | ||||
| fi | ||||
| 
 | ||||
| 
 | ||||
| git config --local include.path $CONFIG | ||||
| 
 | ||||
| echo "La configuration est bien chargée: '$CONFIG'. Enjoy !" | ||||
| echo "Pour effacer la configuration, lancer:" | ||||
| echo "        git-stop" | ||||
							
								
								
									
										3
									
								
								git-stop
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								git-stop
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,3 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| git config --local --unset include.path | ||||
							
								
								
									
										23
									
								
								gitconfig_alban
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								gitconfig_alban
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| [user] | ||||
| 	name = Alban Bronisz | ||||
| 	email = alban.bronisz@probayes.com | ||||
| [push] | ||||
| 	default = simple | ||||
| [alias] | ||||
| 	hist = log --pretty='%h %ad | %s%d [%an]' --graph --date=short | ||||
| 	h = log --pretty='%h %ad | %s%d [%an]' --graph --date=short -5 | ||||
| 	ignore = update-index --assume-unchanged | ||||
| 	ignored = !git ls-files -v | grep ^[[:lower:]] | ||||
| 	s = status | ||||
| 	a = add -A -p | ||||
| 	d = diff | ||||
| 	dc = diff --cached | ||||
| 	c = checkout -p | ||||
| 	b = branch -avv | ||||
| 	ss = stash save | ||||
| 	sl = stash list | ||||
| 	sp = stash pop | ||||
| 	aw = -c interactive.diffFilter=\"git diff --color-words\" add -A -p | ||||
| 	cg = config --global --edit | ||||
| 	cl = config --local --edit | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user