Common git operations » History » Version 1
cryptogopher, 2019-05-04 22:54
1 | 1 | cryptogopher | h1. Common git operations |
---|---|---|---|
2 | 1 | cryptogopher | |
3 | 1 | cryptogopher | |
4 | 1 | cryptogopher | Prerequisites: |
5 | 1 | cryptogopher | <pre> |
6 | 1 | cryptogopher | cd ~/plugins/issue_recurring |
7 | 1 | cryptogopher | </pre> |
8 | 1 | cryptogopher | |
9 | 1 | cryptogopher | h2. Issue resolution in separate branch |
10 | 1 | cryptogopher | |
11 | 1 | cryptogopher | h3. Merge branch into master |
12 | 1 | cryptogopher | |
13 | 1 | cryptogopher | # Push uncommited changes on branch. |
14 | 1 | cryptogopher | # Checkout and update master: |
15 | 1 | cryptogopher | <pre> |
16 | 1 | cryptogopher | $ git checkout master |
17 | 1 | cryptogopher | $ git pull |
18 | 1 | cryptogopher | </pre> |
19 | 1 | cryptogopher | # Merge and push issueN branch: |
20 | 1 | cryptogopher | <pre> |
21 | 1 | cryptogopher | $ git merge issueN |
22 | 1 | cryptogopher | $ git push |
23 | 1 | cryptogopher | </pre> |
24 | 1 | cryptogopher | # Delete merged branch from local and remote: |
25 | 1 | cryptogopher | <pre> |
26 | 1 | cryptogopher | $ git branch -d issueN |
27 | 1 | cryptogopher | $ git push origin :issueN |
28 | 1 | cryptogopher | </pre> |
29 | 1 | cryptogopher | # Verify: |
30 | 1 | cryptogopher | <pre> |
31 | 1 | cryptogopher | $ git branch -a |
32 | 1 | cryptogopher | </pre> |