git tutorial

This commit is contained in:
james 2024-10-22 11:20:06 +02:00
parent 3def33bef7
commit d22b3c8a15
1 changed files with 10 additions and 57 deletions

View File

@ -1,59 +1,12 @@
git status
git add.
git commit
git log
git remove -v
git remote remove file_name
git remote add vps
git remote add priv
git pull vps
git pull priv
git push vps
git push priv
touch.gitignore
sudo nano gitignore
*.swp
*.out
# Usefull:
docker volume create portainer_data (?)
sudo usermod -aG docker user (?)
sudo docker run --detach\ (?)
cd ..
ip r
touch .token (ukryty plik)
# Windows:
ipconfig
ssh mati@192.168.10.70 (-p 2233 [Port 2233]) (password: pass, passpass, passpasspass) (example of IP address)
# Linux:
mkdir work
cd work/
mkdir 3i
cd 3i/
mkdir JakubK-proj
cd JakubK-proj/
ls -l -a -R ( -a pozwala widzieć ukryte pliki, -R podkatalogi)
touch token
sudo nano token
echo $(cat token)
# Github (priv):
git remote set-url priv https://token:$(cat token)@github.com/JJgg260/MIELSK-PASSO/lesson.git
git remote -v
git init (inicjacja)
git add .
git commit
git push priv
# Gitlab (local):
git remote set-url local http://token:glpat-qAkxUwsR9yF2_UjVo1zK@localhost:8080/3i/test.git
git init
git remote add priv https://token:token_name@qstack.pl:3000/c2024/projekt
git remote set-url priv https://token:token_name@qstack.pl:3000/c2024/projekt
git remote remove priv https://token:token_name@qstack.pl:3000/c2024/projekt
git remote -v
git status
git checkout -b jkukiela (zmiana branch-a)
git status
git push local
git add .
git commit
git push priv
git checkout -b nazwa_brancha
git switch nazwa_brancha
git pull priv
git log