Wiki » History » Version 7
Version 6 (Gateau, Thibault, 02/19/2019 02:48 PM) → Version 7/15 (Gateau, Thibault, 02/19/2019 03:04 PM)
h1.
Create local git repository and initialize it
h2.
#create a local git server
#T1>
cd && mkdir serverTestGit && cd serverTestGit
mkdir projet.git && cd projet.git
git --bare init
h2.
#initialize it
#T2>
#cloner le repo pseudo-distant
cd && mkdir git && cd git
git clone <user>@localhost:~/serverTestGit
cd projet serverTestGit
#configurer l'<user> local
git config --global user.email <user@userplace.eu>
git config --global user.name <user>
#faire un premier commit et le pusher
echo -e "lorem ispum \n titi \ toto" >> readme.md
git add readme.md
git commit -m "initial commit"
git push origin master
h2.
#use it...
h1.
Useful links
* example of .gitconfig: https://sourceforge.isae.fr/projects/iut_testing/repository/revisions/master/entry/.gitconfig
* this readme.md: https://sourceforge.isae.fr/projects/iut_testing/repository/revisions/master/entry/localGitTutorial.md
* tutorials:
- official: https://git-scm.com/docs/gittutorial
- interactive: https://www.katacoda.com/courses/git
- branching interactive: https://learngitbranching.js.org/
- smartgit: https://www.syntevo.com/smartgit/download/
h1.
Useful commands
Create local git repository and initialize it
h2.
#create a local git server
#T1>
cd && mkdir serverTestGit && cd serverTestGit
mkdir projet.git && cd projet.git
git --bare init
h2.
#initialize it
#T2>
#cloner le repo pseudo-distant
cd && mkdir git && cd git
git clone <user>@localhost:~/serverTestGit
cd projet serverTestGit
#configurer l'<user> local
git config --global user.email <user@userplace.eu>
git config --global user.name <user>
#faire un premier commit et le pusher
echo -e "lorem ispum \n titi \ toto" >> readme.md
git add readme.md
git commit -m "initial commit"
git push origin master
h2.
#use it...
h1.
Useful links
* example of .gitconfig: https://sourceforge.isae.fr/projects/iut_testing/repository/revisions/master/entry/.gitconfig
* this readme.md: https://sourceforge.isae.fr/projects/iut_testing/repository/revisions/master/entry/localGitTutorial.md
* tutorials:
- official: https://git-scm.com/docs/gittutorial
- interactive: https://www.katacoda.com/courses/git
- branching interactive: https://learngitbranching.js.org/
- smartgit: https://www.syntevo.com/smartgit/download/
h1.
Useful commands