-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwiki
More file actions
48 lines (31 loc) · 1.45 KB
/
Copy pathwiki
File metadata and controls
48 lines (31 loc) · 1.45 KB
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
since happycasts stress on problem-centered and "get the probem solved", so I will this time talk about github workflow, rather than git-rebase. git-rebase will be used just as a sligtly nicer way than git-pull.
but happycasts can also be tool-centered, so I may give a overview to git-rebase as well.
0. when you always pull before you do your own commits, and nobody will push while you are doing your patch.
everybody is happy, just run git pull and git push
this is no way for conflicts to happen
1. when someone pulled before you, and there is no conflicts
you can do either git pull or git rebase
so people the steps, show people the end result, let people decide which one they need, pull or rebase?
2. when someone pulled before you and there is conflicts
you still can do both
show people the merge tool, maybe
NOTE: git rebase origin/master usually does not work, you need to pull the server master to the local first then do the rebase locally. If you want "git rebase origin/master" work, you first need to do "git fetch origin" so that the .git/ref/origin/master sha1 can be updated.
this:
git checkout -b tmp
git checkout master
git throwh
git pull
git checkout tmp
git rebase master
git checkout master
git merge tmp
git push
equals:
git fetch origin
git rebase origin/master
git push
#shownotes
```terminal
sudo apt-get install meld
git config --global merge.tool meld
```