67 lines
1.3 KiB
Markdown
Executable File
67 lines
1.3 KiB
Markdown
Executable File
Clone existing repository to local file system:
|
|
|
|
git clone https://code.databasepro.eu/support/oracle.git
|
|
cd oracle/
|
|
|
|
Example modifiyng an existing file:
|
|
|
|
git add timhall/mon_nouveau_fichier.txt
|
|
echo "2-eme ligne" >> timhall/mon_nouveau_fichier.txt
|
|
git commit -m " Rajout d'une 2-eme linge dans timhall/mon_nouveau_fichier.txt"
|
|
|
|
|
|
git add timhall/mon_nouveau_fichier.txt
|
|
echo "3-eme ligne" >> timhall/mon_nouveau_fichier.txt
|
|
git commit -m " Rajout d'une 3-eme linge dans timhall/mon_nouveau_fichier.txt"
|
|
|
|
git fetch
|
|
git push origin master
|
|
|
|
Removing a directory:
|
|
|
|
git rm -r timhall
|
|
git commit . -m "Remove timhall directory"
|
|
|
|
git fetch
|
|
git push origin master
|
|
|
|
Add a directory:
|
|
|
|
git add timhall
|
|
git commit -m "Add Timm Hall directory"
|
|
|
|
git fetch
|
|
git push origin master
|
|
|
|
Save credentials locally:
|
|
|
|
git config --global credential.helper store
|
|
git pull
|
|
cat ~/.git-credentials
|
|
|
|
|
|
New project
|
|
-----------
|
|
|
|
Create new project using Gitlab web interface.
|
|
Form command line:
|
|
|
|
cd programming
|
|
git switch -c main
|
|
touch README.md
|
|
git add README.md
|
|
git commit -m "add README"
|
|
git push -u origin main
|
|
|
|
|
|
Add directory:
|
|
|
|
mkdir python bash
|
|
echo "empty" > python/Readme.md
|
|
echo "empty" > bash/Readme.md
|
|
git add python/*
|
|
git add bash/*
|
|
git commit -m "Add python & bash"
|
|
git fetch
|
|
git push
|