-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/silx-kit/silx-training
- Loading branch information
Showing
19 changed files
with
1,381 additions
and
1,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ | |
} | ||
</style> | ||
.. include:: <isonum.txt> | ||
GIT | ||
=== | ||
|
@@ -74,19 +77,20 @@ encourage collaboration using forks of projects. | |
The main advantages are: | ||
* simplify contribution. | ||
* many tutorials for `gitHub <https://guides.github.com/>`_ and `gitlab <https://docs.gitlab.com/ee/gitlab-basics/>`_. | ||
* many tutorials for `github <https://guides.github.com/>`_ and `gitlab <https://docs.gitlab.com/ee/gitlab-basics/>`_. | ||
* web page hosting for projects. | ||
* over the years a cluster of services have pop up to help developers like `Travis <https://github.com/marketplace/travis-ci>`_ and `AppVeyor <https://github.com/marketplace/appveyor>`_). | ||
* `offer a fixed pipeline based on *Pull request* <https://help.github.com/articles/using-pull-requests/>`_. | ||
* lead to some 'normalization' of projects. | ||
* lead to some 'standardization' of projects. | ||
---- | ||
github vs gitlab | ||
```````````````` | ||
* github should bring to your project an `Higher visibility compared to other hosting (in 2017) <http://software.ac.uk/resources/guides/choosing-repository-your-software-project>`_. | ||
* github is usually one step ahead of gitlab regarding features and usability. | ||
* github is usually one step ahead compare to gitlab regarding features and usability. | ||
* activities on github are monitored by head-hunters and can be useful for professional placement. | ||
* gitlab allows you to select a privacy level for your projects. Public projects can be seen from outside: https://gitlab.esrf.fr/public not private projects. | ||
* github is free for open-source project. | ||
|
@@ -98,8 +102,10 @@ github vs gitlab | |
Presenter Notes | ||
............... | ||
The amount of the acquirement by Microsoft show the importance of github on the today life of the developer. | ||
As a consequence thousands of project has move from github to gitlab. (50000 after a week) | ||
* github intend to open itself to services, gitlab intend to embed them. Usage is the same but philosophy is different. | ||
* The amount of the acquirement by Microsoft show the importance of github on the today life of the developer. | ||
As a consequence thousands of project has move from github to gitlab. (50000 after a week) | ||
* gitlab is free and open source. But has big compamies behind (nas, bayer, siemens...) | ||
---- | ||
|
@@ -117,9 +123,9 @@ git permits several workflows: | |
Presenter Notes | ||
............... | ||
- centralized : a single point of entry 'central repository'. Let each users to deal with synchronization | ||
- feature branch workflow: each new feature should take place in a dedicated branch | ||
- gitflow : strict management of branches designed for releases. One branch per: | ||
* centralized : a single point of entry 'central repository'. Let each users to deal with synchronization | ||
* feature branch workflow: each new feature should take place in a dedicated branch | ||
* gitflow : strict management of branches designed for releases. One branch per: | ||
- releases | ||
- each feature | ||
- fix | ||
|
@@ -139,13 +145,14 @@ Presenter Notes | |
............... | ||
Why the 'forking flow' ? ==> commonly used. The one of silx for example. | ||
This schema is very important ant we will follow it during all along training | ||
The idea is that each developer can interact with other from his own fork. | ||
Each developer can request to merge some modifications (feature, bug fix...) with others: this is a pull request | ||
- simplify branch forking | ||
- Always keep upstream branch ready for deployment with features and fixes | ||
- Each new branch starts from the master (up to date) | ||
- Use merge request for each new feature | ||
* simplify branch forking | ||
* Always keep upstream branch ready for deployment with features and fixes | ||
* Each new branch starts from the master (up to date) | ||
* Use merge request for each new feature | ||
---- | ||
|
@@ -197,7 +204,7 @@ Example: create a new git project (2) | |
.. code-block:: bash | ||
git remote add origin [email protected]:silx/silx-trainings/pypolynom.git | ||
git remote add origin [email protected]:silx/pypolynom.git | ||
7. add files to a commit (detail later) | ||
|
@@ -234,11 +241,10 @@ Hands on: fork an existing project | |
1.1 login to github / gitlab | ||
1.2 look for the 'https://gitlab.esrf.fr/silx/silx-trainings/pypolynom_completed' project | ||
1.2 look for the 'https://gitlab.esrf.fr/silx/pypolynom' project | ||
1.3 fork the project and go to the homepage of the fork you just created | ||
.. include:: <isonum.txt> | ||
|rarr| This will provide you an url to your personal repository. | ||
|
@@ -257,7 +263,7 @@ Hands on: fork an existing project | |
.. code-block:: bash | ||
git clone [email protected]:[my_id]/pypolynom_completed.git | ||
git clone [email protected]:[my_id]/pypolynom.git | ||
|rarr| You are now ready for making some modifications and share them with others. | ||
|
@@ -274,15 +280,24 @@ branches | |
|rarr| Two branches can be merge together. | ||
The case we will consider: | ||
.. image:: images/git_branch.png | ||
:align: center | ||
:width: 50% | ||
A more realistic case: | ||
.. image:: images/branches_real.png | ||
:align: center | ||
:width: 28% | ||
Presenter Notes | ||
``````````````` | ||
Eah commit has an 'ID': SHA-1 checksum from modifications + commit message + author + date | ||
To simplify thinks, we will consider the master branch to be the develop branch. | ||
---- | ||
|
@@ -323,6 +338,11 @@ commits with authors, data time, file changed, and the chain of commits called * | |
.. note:: *graphic tools as* `git-gui <https://git-scm.com/docs/git-gui>`_ *and* `gitk <https://git-scm.com/docs/gitk>`_ *might help you for commits and to have a graphic representation of the tree view.* | ||
Presenter Notes | ||
``````````````` | ||
git add / git commit can be repeated | ||
---- | ||
Some useful git commands | ||
|
@@ -333,20 +353,21 @@ Some useful git commands | |
* *git diff* : show changes between commits | ||
* *git tag* : add a tag at a specific point of the history | ||
---- | ||
Presenter Notes | ||
............... | ||
git tag can help you to retrieve some milestone | ||
git reflog | ||
---- | ||
Hands on: propose modifications | ||
------------------------------- | ||
For this exercise you can use a `git Cheat sheet <https://education.github.com/git-cheat-sheet-education.pdf>`_ if you like. | ||
Now we want to make some modifications on the source code (for a bug fix for example). | ||
The goal is to make some modifications on the source code (for a bug fix for example). | ||
We need to: | ||
* create a new branch relative to the bug fix | ||
|
@@ -477,7 +498,7 @@ the one from the other developers. | |
|
||
.. code-block:: bash | ||
git remote add upstream [email protected]:silx/silx-trainings/pypolynom.git | ||
git remote add upstream [email protected]:silx/pypolynom.git | ||
# git remote add co-worker [email protected]:<co-worker>/pypolynom.git | ||
2. merge those modification on your master branch | ||
|
@@ -519,3 +540,9 @@ or you might want to contribute to other projects. | |
How to contribute to an Open Source project is presented in | ||
`this document <http://scikit-image.org/docs/stable/contribute.html>`_ | ||
for scikit-image. | ||
|
||
|
||
Presenter Notes | ||
............... | ||
|
||
I hope you where happy to meet your new best friend |
Oops, something went wrong.