-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.txt
More file actions
42 lines (30 loc) · 1 KB
/
Copy pathgit.txt
File metadata and controls
42 lines (30 loc) · 1 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
Creating a Remote Branch
git push origin origin:refs/heads/test
Make sure everything is up-to-date
git fetch origin
Then you can see that the branch is created.
git branch -r
This should show ‘origin/test’
Start tracking the new branch
git checkout --track -b test origin/test
Deleting remote branch
git push origin :test
Create and switch to branch
git checkout -b test
Remove file completely
git filter-branch --tree-filter /
rm -f something.txt'
git bisect
To upate to the latest version in remote repo
git fetch -q origin && git fetch --tags -q origin && git reset -q --hard origin/master && git clean -q -d -x -f
git remote prune origin
Branch - create, push, delete cycle
git branch test
git checkout test
git push -u origin test
git branch -d test
git push origin :test
how to pick only a few commits to rebase and push vs leave other commits behind\
git rebase -i origin/master
git push origin "HEAD^:master"
- HEAD^:master - HEAD^ to remote master