Project

General

Profile

Common git operations » History » Version 3

cryptogopher, 2019-05-10 00:00

1 1 cryptogopher
h1. Common git operations
2
3
4
Prerequisites:
5
<pre>
6
cd ~/plugins/issue_recurring
7
</pre>
8
9
h2. Issue resolution in separate branch
10
11 2 cryptogopher
h3. Create separate branch for issue
12 3 cryptogopher
13 2 cryptogopher
# Checkout and update master:
14
<pre>
15
$ git checkout master
16
$ git pull
17
</pre>
18
# Create, checkout new branch and push it to remote (so it will be tracked and replicated on it.michalczyk.pro):
19
<pre>
20
$ git checkout -b issueN
21
$ git push -u origin issueN
22
</pre>
23 1 cryptogopher
24 2 cryptogopher
h3. Merge issue branch into master
25
26
# Push uncommited changes on issue branch.
27 1 cryptogopher
# Checkout and update master:
28
<pre>
29
$ git checkout master
30
$ git pull
31
</pre>
32
# Merge and push issueN branch:
33
<pre>
34
$ git merge issueN
35
$ git push
36
</pre>
37
# Delete merged branch from local and remote:
38
<pre>
39
$ git branch -d issueN
40
$ git push origin :issueN
41
</pre>
42
# Verify:
43
<pre>
44
$ git branch -a
45
</pre>