-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_example.txt
More file actions
33 lines (26 loc) · 859 Bytes
/
git_example.txt
File metadata and controls
33 lines (26 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
git init
git clone /path/to/repository
git clone username@host:/path/to/repository
git add <filename>
git add *
git commit -m "Commit message"
git push origin master
//Zmień master na dowolną gałąź, której zmiany wysyłasz.
//Jeśli nie sklonowałeś istniejącego repozytorium i chcesz połączyć je ze zdalnym serwerem,
//musisz go dodać poprzez
git remote add origin <server>
//utwórz nową gałąź o nazwie "feature_x" i przełącz się na nią
git checkout -b feature_x
git push origin <branch>
//przełącz się z powrotem na master
git checkout master
//aby scalić inną gałąź z gałęzią aktywną (np. master), użyj
git merge <branch>
//usuń gałąź
git branch -d feature_x
//aby zaktualizować lokalne repozytorium do ostatniego commita
git pull
git fetch origin
git reset --hard origin/master
//wbudowane GUI dla git
gitk