-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit.cmd.txt
66 lines (39 loc) · 1.4 KB
/
git.cmd.txt
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
git config --global user.email "viktor.XXXXX@gmail.com"
git config --global user.name "Viktor XXXX"
cat ~/.gitconfig
git init
git status
git branch
git add test*.py
git status
git diff
git commit -m 'first commit for the new files'
git remove test1.py
git commit -m "files are deleted"
tree
git status
git log
git push origin master
git remote -v
git pull origin master - get files from github
git pull origin devnet - if we take if from branch
git stash - discard changes
git reset HEAD test_file
git checkout -b devnet main - create and switch to the branch
git branch ssh-feature - creates branch
git checkout ssh-feature - switch to the branch
git push --set-upstream origin devnet
git push origin devnet
git branch -r = known remote branches
we can sync new branches with remote origins
git checkout -b new_feature origin/main
When we create a pull request - we combine the changes and resolve the confilcts.
When two files are in conflict - we make a code review and resolve the problem.
When conflicts are resolved we merge file on GitHub.
After merged on github we need to pull it on local git repo from main
git pull origin main - for both main the devnet repos
#
We can make changes in devnet branch - and merge with main locally
Or make cnages to devnet branch and push it to origin devnet , pull request - merge and - and make git pull from github to local repo
# Git fetch
git rebase