Skip to content

Commit 4d583b4

Browse files
committed
Tidy up git.md. However it should be purged.
1 parent 44b4918 commit 4d583b4

File tree

1 file changed

+29
-37
lines changed

1 file changed

+29
-37
lines changed

coredev/git.md

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,34 @@ myst:
77
"keywords": ""
88
---
99

10-
% -*- coding: utf-8 -*-
10+
```{todo}
11+
I seriously question the value of this entire guide.
12+
I think it should be purged.
13+
Plone should not be in the business of teaching how to use git or GitHub.
14+
```
1115

1216
# Working with Git and GitHub
1317

14-
## The Plone Git workflow & branching model
18+
## The Plone Git workflow and branching model
1519

1620
Our repository on GitHub has the following layout:
1721

18-
- **feature branches**:
19-
all development for new features must be done in dedicated branches, normally one branch per feature,
20-
- **main** or **master** **branch**:
21-
when features get completed they are merged into the master branch;
22-
bugfixes are commited directly on the master branch,
23-
- **tags**:
24-
whenever we create a new release we tag the repository so we can later re-trace our steps, re-release versions, etc.
22+
- **feature branches**:
23+
All development for new features must be done in dedicated branches, normally one branch per feature.
24+
- **main** or **master** **branch**:
25+
when features get completed they are merged into the master branch; bugfixes are commited directly on the master branch,
26+
- **tags**:
27+
whenever we create a new release, we tag the repository so we can later retrace our steps, or rerelease versions.
28+
2529

26-
## Git Basics
30+
## Git basics
31+
32+
Some introductory definitions and concepts, if you are already familiar enough with Git, head to next section: {ref}`general-guidelines-label`.
2733

28-
Some introductory definitions and concepts, if you are already familiar enough with Git,
29-
head to next section: {ref}`general-guidelines-label`.
3034

3135
### Mental working model
3236

33-
With Git (as well as all modern [DVCS](http://en.wikipedia.org/wiki/Distributed_revision_control)),
34-
distributing changes to others is a two steps process (contrary to traditional VCS like `svn`).
37+
With Git (as well as all modern [DVCS](http://en.wikipedia.org/wiki/Distributed_revision_control)), distributing changes to others is a two steps process (contrary to traditional VCS like `svn`).
3538

3639
This way what on svn is a single `svn ci` in Git is two commands: `git commit` and `git push`.
3740

@@ -45,6 +48,7 @@ You can freely fix/change/remove/rework/update/... your commits afterwards.
4548

4649
Push your changes whenever you are sure they are what you, and others, expect them to be.
4750

51+
4852
### Concepts
4953

5054
In Git there are:
@@ -63,28 +67,22 @@ tags
6367

6468
`HEAD`
6569

66-
: A pointer that always tells you where you are
67-
(extremely useful when doing some operations).
70+
: A pointer that always tells you where you are (extremely useful when doing some operations).
6871

6972
The index
7073

7174
: A temporal staging storage with changes on files that are pending to be added to a commit.
72-
If your Git output is colored,
73-
green filenames are those in the index.
75+
If your Git output is colored, green filenames are those in the index.
7476

7577
Working tree
7678

7779
: Your current modified files.
7880
This is the only place where you can loose your changes.
79-
If your Git output is colored,
80-
red filenames are those in the working tree.
81+
If your Git output is colored, red filenames are those in the working tree.
8182

8283
Stash
8384

84-
: Temporal storage for changes,
85-
again,
86-
extremely useful in some scenarios,
87-
see further below for examples.
85+
: Temporal storage for changes, again, extremely useful in some scenarios, see further below for examples.
8886

8987
### Branches
9088

@@ -115,37 +113,31 @@ add
115113

116114
: Add the given files to the index.
117115

118-
:::{note}
116+
```{note}
119117
**pro tip**: once a file is add via `git add` your changes will never be lost!
120-
As long as you don't remove the `.git` folder,
121-
even if you remove the file you just added,
122-
the changes you made before doing `git add` are still there ready to be recovered at any time!
123-
:::
118+
As long as you don't remove the `.git` folder, even if you remove the file you just added, the changes you made before doing `git add` are still there ready to be recovered at any time!
119+
```
124120

125121
status
126122

127123
: Get an overview of the repository status.
128124

129-
If there are files on the index,
130-
or files not tracked by Git,
131-
or the status of your local branch with regards to the remote,
132-
etc.
125+
If there are files on the index, or files not tracked by Git, or the status of your local branch with regards to the remote, etc.
133126

134127
diff
135128

136129
: See the current changes made to the files already tracked by Git.
137130

138-
:::{note}
131+
```note}
139132
Fear not, if you used `git add SOME_FILE` and then `git diff` doesn't output anything you haven't lost your changes!
140133
141134
Just try `git diff --cached`.
142135
Now you know how to see the working tree changes (`git diff`) and index changes (`git diff --cached`).
143-
:::
136+
```
144137

145138
commit
146139

147-
: Create/record changes to the repository
148-
(locally only, nothing is sent over the wire).
140+
: Create/record changes to the repository (locally only, nothing is sent over the wire).
149141

150142
push
151143

0 commit comments

Comments
 (0)