-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.txt
More file actions
25 lines (22 loc) · 694 Bytes
/
git.txt
File metadata and controls
25 lines (22 loc) · 694 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
rebase one FEATURE branch on MASTER:
git fetch origin
git checkout MASTER
git pull --rebase origin MASTER
git checkout FEATURE
git rebase MASTER
git push --force-with-lease origin FEATURE
merge FEATURE into MASTER:
rebase one FEATURE branch on MASTER
git checkout MASTER
git merge [--ff|--no-ff] FEATURE
git push origin MASTER
merge parameters:
--ff:
- no merge commit is created
- for small feature branches (few commits and/or few files)
- cause it gets chaotic else
--no-ff:
- a merge commit is created
- for larger things (many commits, lots of files)
- if we want to be able to revert it easily
remove all unstaged changes: git clean -df