Add git repository initialization (#69)
Add git repository setup step to git setup part of README. Fix indentation issue on `git add ` step
This commit is contained in:
parent
11a9829071
commit
26cf4be631
@ -74,6 +74,12 @@ There are a set of rules to keep in mind:
|
|||||||
### 1.2 Git workflow
|
### 1.2 Git workflow
|
||||||
Because of most of the reasons above, we use [Feature-branch-workflow](https://www.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) with [Interactive Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing) and some elements of [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow) (naming and having a develop branch). The main steps are as follow:
|
Because of most of the reasons above, we use [Feature-branch-workflow](https://www.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) with [Interactive Rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing) and some elements of [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows#gitflow-workflow) (naming and having a develop branch). The main steps are as follow:
|
||||||
|
|
||||||
|
* For a new project, initialize a git repository in the project directory. __For susequent features/changes this step should be ignored__.
|
||||||
|
```sh
|
||||||
|
cd <project directory>
|
||||||
|
git init
|
||||||
|
```
|
||||||
|
|
||||||
* Checkout a new feature/bug-fix branch
|
* Checkout a new feature/bug-fix branch
|
||||||
```sh
|
```sh
|
||||||
git checkout -b <branchname>
|
git checkout -b <branchname>
|
||||||
@ -106,7 +112,7 @@ Because of most of the reasons above, we use [Feature-branch-workflow](https://w
|
|||||||
|
|
||||||
* If you don’t have conflict skip this step. If you have conflicts, [resolve them](https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/) and continue rebase
|
* If you don’t have conflict skip this step. If you have conflicts, [resolve them](https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/) and continue rebase
|
||||||
```sh
|
```sh
|
||||||
git add <file1> <file2> ...
|
git add <file1> <file2> ...
|
||||||
git rebase --continue
|
git rebase --continue
|
||||||
```
|
```
|
||||||
* Push your branch. Rebase will change history, so you'll have to use `-f` to force changes into the remote branch. If someone else is working on your branch, use the less destructive `--force-with-lease`.
|
* Push your branch. Rebase will change history, so you'll have to use `-f` to force changes into the remote branch. If someone else is working on your branch, use the less destructive `--force-with-lease`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user