Skip to content

Commit a4eaaed

Browse files
committed
add README_en.md
1 parent eff6a9c commit a4eaaed

12 files changed

+3517
-5
lines changed

Git-Flow/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[English Version](README_en.md)
2+
13
# Git-Flow 基本教學 :memo:
24

35
[Git-Flow Tutorials - youtube](https://youtu.be/zXlta66thZY)

Git-Flow/README_en.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Git-Flow Basic Tutorial :memo:
2+
3+
[English Version](README_en.md)
4+
5+
[Git-Flow Tutorials - youtube](https://youtu.be/zXlta66thZY)
6+
7+
[Git-Flow SmartGit Tutorials - youtube](https://youtu.be/ualXHytifbg)
8+
9+
Before you start to understand Git-Flow, it is recommended that you have a basic understanding of Git.
10+
11+
You can refer to the [Git-Tutorials GIT Basic Usage Tutorial](https://github.com/twtrubiks/Git-Tutorials) I wrote before.
12+
13+
## What is Git-Flow
14+
15+
There are many commands in Git. If you use Git-Flow, you will have some extra features.
16+
17+
But these features are just combinations of basic functions. To put it simply,
18+
19+
it's the concept of A = B + C + D. Of course, you don't have to worry about memorizing extra commands.
20+
21+
There is a GUI interface (there are many sets to use, I use [SmartGit](http://www.syntevo.com/smartgit/)), and it is very convenient.
22+
23+
## Why use Git-Flow
24+
25+
When you are using Git by yourself, it must be very cool. You can decide how to commit or
26+
27+
how to merge, or even which branch to develop on. But
28+
29+
what if it's a multi-person collaborative development? Everyone has their own habits, wouldn't that
30+
31+
be chaos? So Git-Flow was born.
32+
33+
## Git-Flow is not a new technology, it is just a specification
34+
35+
Many people, when they first see Git-Flow, will think, wow! What is this thing? It's so trendy.
36+
37+
But it is just **a specification**, not a new technology. When a whole
38+
39+
team follows a certain workflow, problems are less likely to occur.
40+
41+
Git-Flow is a set of specifications. If you or your company are very familiar with Git,
42+
43+
you can also define your own Flow. Not following Git-Flow
44+
45+
will not cause any conflicts at all.
46+
47+
## Git-Flow Model
48+
49+
In Git-Flow, there are two main branches:
50+
51+
***Master***
52+
53+
This branch is very stable and is production-ready at all times. It contains the latest release, which is the source code of the product. When anyone uses your product, the first thing they see is master. **We cannot make any commits directly on the master branch, we can only merge back from Release or Hotfix**.
54+
55+
***Develop***
56+
57+
The development branch. The develop branch is branched from the master branch. This (develop) branch provides integration of different upcoming release features. So this branch may be unstable (have bugs). Usually, we don't commit directly on this branch either, but merge features in through merging.
58+
59+
Master and Develop are two very important branches. In theory, these two branches should be well protected to avoid accidental deletion.
60+
61+
In addition to the **Master** and **Develop** branches, Git-Flow also provides other branches:
62+
63+
***Feature***
64+
65+
Feature development. This branch is branched from the develop branch and will eventually be merged back into the develop branch. For example, suppose there are two features, A and B, being developed by two people. These two people will respectively branch out two branches, A and B, from the develop branch. When they are finished, they will merge back to develop.
66+
67+
***Release***
68+
69+
When we think that develop is already a very stable version, we will enter the release. This branch is branched from the develop branch. Usually, we will do a full test and pre-launch preparation (release version record) on this branch. After completing the release, we will merge back to master and develop.
70+
71+
***Hotfix***
72+
73+
This branch is branched from the master branch. Usually, it is already online, but suddenly a very urgent bug is found. At this time, we will open a Hotfix to fix the bug. After completion, we will merge back to master and develop.
74+
75+
## Using SmartGit to complete Git-Flow
76+
77+
There are many similar GUI interfaces. You can find one that suits you. I will use [SmartGit](http://www.syntevo.com/smartgit/) for the introduction here.
78+
79+
### Installing SmartGit
80+
81+
Please go to [SmartGit](http://www.syntevo.com/smartgit/) to download the one that matches your operating system.
82+
83+
There should be no problems with the installation. The place to pay more attention to is that if you are a non-commercial version,
84+
85+
please choose non-commercial (as shown below). If it is a commercial version, please purchase a license.
86+
87+
![](http://i.imgur.com/Qo6iy0l.jpg)
88+
89+
Set some things to complete.
90+
91+
![](http://i.imgur.com/thRWcvv.jpg)
92+
93+
After entering SmartGit, please select the project first, and then we click the Git-Flow icon (as shown below).
94+
95+
![](http://i.imgur.com/MbJPEIF.jpg)
96+
97+
Usually, we will choose **Full** for Git-Flow Type, which is the complete branch.
98+
99+
![](http://i.imgur.com/xnUn9vS.jpg)
100+
101+
You will find that the two main branches in the lower left corner have appeared.
102+
103+
![](http://i.imgur.com/XfWWByZ.jpg)
104+
105+
To add any Feature or Release, you can click the Git-Flow icon.
106+
107+
![](http://i.imgur.com/0147G33.jpg)
108+
109+
For more detailed introduction, please refer to
110+
111+
[Git-Flow SmartGit Tutorials - youtube](https://youtu.be/ualXHytifbg)
112+
113+
## Reference
114+
115+
* [gitflow](https://github.com/nvie/gitflow)
116+
117+
## Donation
118+
119+
The articles are all original after my own research and internalization. If it has helped you and you want to encourage me, you are welcome to buy me a cup of coffee :laughing:
120+
121+
122+
123+
[Sponsor Payment](https://payment.opay.tw/Broadcaster/Donate/9E47FDEF85ABE383A0F5FC6A218606F8)
124+
125+
## License
126+
127+
MIT license

Multiple_SSH_Keys_settings.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[English Version](Multiple_SSH_Keys_settings_en.md)
2+
13
# Multiple SSH Keys settings for different github account
24

35
如果你對這個真的很陌生,建議看影片 :smile:
@@ -152,4 +154,4 @@ git config user.email "[email protected]"
152154

153155
## License
154156

155-
MIT licens
157+
MIT licens

Multiple_SSH_Keys_settings_en.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Multiple SSH Keys settings for different github account
2+
3+
[English Version](Multiple_SSH_Keys_settings_en.md)
4+
5+
If you are really unfamiliar with this, I suggest watching the video :smile:
6+
7+
* [Youtube Tutorial - Multiple SSH Keys settings for different github account](https://youtu.be/gDxG-4tF7B8)
8+
9+
## Foreword
10+
11+
Sometimes we may encounter a situation where we need to have multiple GitHub accounts on the same computer. Why?
12+
13+
When your work computer and your own side project development are on the same computer, you will need the help of this article :kissing_smiling_eyes:
14+
15+
Trust me, you don't want to use your company's account to push commits to your own side project :sweat_smile:
16+
17+
## Tutorial
18+
19+
First, generate an ssh key. If you don't know how to generate one,
20+
21+
you can refer to [Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/) or [Basic GitHub Tutorial - From Scratch](https://www.youtube.com/watch?v=py3n6gF5Y00).
22+
23+
Open your Git Bash.
24+
25+
```cmd
26+
ssh-keygen -t rsa -b 4096 -C "[email protected]"
27+
```
28+
29+
(Please replace the email with your own)
30+
31+
The key point here is to remember to enter a new rsa name yourself, like `/c/Users/twtrubiks/.ssh/id_rsa_rubik` in the picture below.
32+
33+
This way, you won't overwrite the old rsa.
34+
35+
![alt tag](https://i.imgur.com/2Msr51U.png)
36+
37+
Next, you will have a new file you just created in your `.ssh` path.
38+
39+
![alt tag](https://i.imgur.com/B4g9FQO.png)
40+
41+
Then paste your `id_rsa_rubik.pub` key to your GitHub.
42+
43+
![alt tag](https://i.imgur.com/tfQzFcJ.png)
44+
45+
Usually, when you add it successfully, you will receive an email.
46+
47+
Then enter the command below:
48+
49+
```cmd
50+
ssh-agent -s
51+
```
52+
53+
The above command must be executed. If you skip this step, the following error will occur:
54+
55+
`Could not open a connection to your authentication agent.`
56+
57+
So please remember to execute it.
58+
59+
Create a file named `config` in the `.ssh` directory (the file name is `config`, no extension is needed).
60+
61+
![alt tag](https://i.imgur.com/SJBxro6.png)
62+
63+
Below is an example:
64+
65+
```config
66+
# github - twtrubiks
67+
Host github.com
68+
HostName github.com
69+
IdentityFile ~/.ssh/id_rsa
70+
IdentitiesOnly yes
71+
User twtrubiks
72+
73+
# github - blue-rubiks
74+
Host blue.github.com
75+
HostName github.com
76+
IdentityFile ~/.ssh/id_rsa_rubik
77+
IdentitiesOnly yes
78+
User blue-rubiks
79+
```
80+
81+
You can use the following command to test. If your own username is displayed, it means the setting is successful.
82+
83+
```cmd
84+
85+
```
86+
87+
![alt tag](https://i.imgur.com/rdLf4iX.png)
88+
89+
```cmd
90+
91+
```
92+
93+
![alt tag](https://i.imgur.com/YTNHPfN.png)
94+
95+
ya :heart_eyes: we have set it up successfully~
96+
97+
If there is a problem, you can also use debug mode to see where the problem is. Usually, it is an error in the `config` input.
98+
99+
```cmd
100+
101+
```
102+
103+
Next, let me explain to you first.
104+
105+
```cmd
106+
git config --global user.name "blue-rubiks"
107+
git config --global user.email "[email protected]"
108+
```
109+
110+
`--global` means global. If it is not entered, it means that the repo under the directory will take effect.
111+
112+
Now let's clone a repo to play with (you can create one yourself).
113+
114+
```cmd
115+
git clone [email protected]:blue-rubiks/github-ssh-test.git
116+
```
117+
118+
Next, switch to the directory folder and enter the following command:
119+
120+
```cmd
121+
git config user.name "blue-rubiks"
122+
git config user.email "[email protected]"
123+
```
124+
125+
Note that `--global` is not added here, so it only takes effect for the repo under that directory.
126+
127+
We find the `.git` folder in the repo, and then find the `config` file. The content is roughly as follows:
128+
129+
![alt tag](https://i.imgur.com/vT6GiYR.png)
130+
131+
The main thing is to modify line 9 to line 10, changing it to the `Host` you set.
132+
133+
Finally, you can commit and push with peace of mind.
134+
135+
If you really don't understand what I'm talking about, I suggest watching the video explanation. I will walk you through the operation :laughing:
136+
137+
## Execution Environment
138+
139+
* Win 10
140+
141+
## Reference
142+
143+
* [Multiple SSH Keys settings for different github account](https://gist.github.com/jexchan/2351996)
144+
145+
## Donation
146+
147+
The articles are all original after my own research and internalization. If it has helped you and you want to encourage me, you are welcome to buy me a cup of coffee :laughing:
148+
149+
![alt tag](https://i.imgur.com/LRct9xa.png)
150+
151+
[Sponsor Payment](https://payment.opay.tw/Broadcaster/Donate/9E47FDEF85ABE383A0F5FC6A218606F8)
152+
153+
## License
154+
155+
MIT license

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[English Version](README_en.md)
2+
13
# Git-Tutorials 基本使用教學 :memo:
24

35
因為小弟覺得這東西蠻有趣的,所以就簡單寫個教學文,順便記錄一下 :memo:,希望能幫助想學的人 :smile:

0 commit comments

Comments
 (0)