Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
courses
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nene Barry
courses
Commits
04d9d701
Commit
04d9d701
authored
5 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
minor changes
parent
7ecef2db
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
2019/2019-06-11_gitTraining/slides/best_practices.md
+0
-11
0 additions, 11 deletions
2019/2019-06-11_gitTraining/slides/best_practices.md
2019/2019-06-11_gitTraining/slides/qualityCode.md
+1
-1
1 addition, 1 deletion
2019/2019-06-11_gitTraining/slides/qualityCode.md
with
1 addition
and
12 deletions
2019/2019-06-11_gitTraining/slides/best_practices.md
+
0
−
11
View file @
04d9d701
# Best practices
# Best practices
*
`pull`
before
`push`
*
`pull`
before
`push`
*
Work on your
<font
color=
"red"
>
own
</font>
branch (in your own fork), and
**not**
on
`master`
and
**not**
on
`develop`
*
Work on your
<font
color=
"red"
>
own
</font>
branch (in your own fork), and
**not**
on
`master`
and
**not**
on
`develop`
*
Do
**not push**
to
`master`
, but
**submit a PR**
*
Do
**not push**
to
`master`
, but
**submit a PR**
*
Get your code
**reviewed**
by your peers (submit a PR!)
*
Get your code
**reviewed**
by your peers (submit a PR!)
*
Submit a PR
**often**
!
*
Submit a PR
**often**
!
*
`clone`
a repository, do not download the
`.zip`
file.
*
`clone`
a repository, do not download the
`.zip`
file.
*
Do
**not**
combine
`git`
commands
*
Do
**not**
combine
`git`
commands
```
bash
```
bash
$
git commit
-am
"myMessage"
# do not do this
$
git commit
-am
"myMessage"
# do not do this
```
```
*
Stage only 1 file at once using
*
Stage only 1 file at once using
```
bash
```
bash
$
git add myFile.md
$
git add myFile.md
```
```
*
Commit
**only a few files**
at once (after multiple separate
`git add`
commands)
*
Commit
**only a few files**
at once (after multiple separate
`git add`
commands)
*
`Push`
often - avoid conflicts
*
`Push`
often - avoid conflicts
Remember:
**A `push` a day keeps conflicts away!**
Remember:
**A `push` a day keeps conflicts away!**
This diff is collapsed.
Click to expand it.
2019/2019-06-11_gitTraining/slides/qualityCode.md
+
1
−
1
View file @
04d9d701
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
… actually,
**EVERYONE**
writing documentation, a script, or code is concerned!
… actually,
**EVERYONE**
writing documentation, a script, or code is concerned!
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"slides/img/snoopy.png"
>
<img
src=
"slides/img/snoopy.png"
height=
"400px"
>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment