module | title | subtitle | author | version |
---|---|---|---|---|
B-INN-000 |
Git / Github |
Introduction a git et github |
Mathéo Martin & Xavier Mitaux |
1.0 |
#newpage
- fork this repository
-
clone the repository you have forked
-
create a template that will be used when you will create an issue docs
-
create a template that will be used when you will create a pull requests docs
-
create an issue on your repository
-
create a branch named
github/test-pull-requests
-
create a pull request on your repository (branch
github/test-pull-requests
->main
)
-
create a branch named
dev
-
create a branch named
feat/new-feature-a
that starts fromdev
-
create a file named
CONTRIBUTING.md
andgit add
+git commit
this file -
create a branch named
feat/new-feature-b
that starts fromdev
-
create a file named
CONTRIBUTING.md
andgit add
+git commit
this file -
add some random characters to
CONTRIBUTING.md
andgit add
+git commit
this file -
create a branch named
feat/new-feature-a-b
that starts fromfeat/new-feature-a
and mergefeat/new-feature-b
for now, if you run:
#terminal(git log --cherry --boundary --decorate --color --oneline --graph --all)
it will be something like this:
imageCenter(TODO.png, 350px, 30)
- push the branch
feat/new-feature-a-b
and create the pull requests (branchfeat/new-feature-a-b
->main
)
-
read more about Rebase vs Merge: stackoverflow stackoverflow
-
create a branch named
feat/new-feature-a-b-rebase
that starts fromfeat/new-feature-a
and rebasefeat/new-feature-b
re run the following command
#terminal(git log --cherry --boundary --decorate --color --oneline --graph --all)
- enjoy the difference
-
read more about hooks: git-scm
-
create a file named
hooks/pre-commit
and add the command to execute your norm check -
create a file named
hooks/pre-push
and add the command make to be sure that your code is ready to be pushed
-
read more about Github Actions: github
-
create a workflow that will compile your code every time you push on a branch
-
create a workflow that will check your norm every time you create a pull request
-
create a workflow that open a issue when something goes wrong in your workflow