Skip to content

Commit 87eecc1

Browse files
authored
Many formatting updates (#27)
* Many formatting updates * Fixed broken links * Fixed links * Fixed links v2 * Fixed links v3 * Fixed links v4 * Fixed links v5 * Fixed links v6
1 parent cd3168e commit 87eecc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1035
-1095
lines changed

docs/git-guide/Git working/Stage changes/stage-additions.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/git-guide/Git working/Stage changes/stage-deletions.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/git-guide/Git working/branch.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/git-guide/Workingcopies/usefulgitcommands.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/git-guide/Workingcopies/workflows.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/git-guide/Workingcopies/workingcopies.md

Lines changed: 0 additions & 10 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# Work on a feature branch
1+
---
2+
title: Work on a feature branch
3+
id: feature
4+
sidebar_position: 3
5+
---
26

37
Working with git can be organized by creating a branch for each issue or feature.Git is designed for lightweight branching and merging. You can and should create as many branches as you’d like.
48

59
First, make sure your `develop` branch is up-to-date with Talawa upstream. [(see how)](#keep-your-fork-up-to-date)
610

7-
Next from your `develop` branch,create a new branch. We recommend naming your branch a descriptive name relating to your feature or issue.
11+
Next from your `develop` branch,create a new branch. We recommend naming your branch a descriptive name relating to your feature or issue.
812

913
```
1014
$ git checkout develop
@@ -13,4 +17,4 @@ $ git checkout -b issue-178-docsissue
1317
Switched to a new branch 'issue-178-docsissue'
1418
```
1519

16-
Now you are ready to work on the issue or feature.
20+
Now you are ready to work on the issue or feature.

docs/git-guide/Git working/Fork.md renamed to docs/git-guide/git-workflow/setup/fork.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Keep your fork up to date
1+
---
2+
title: Keep your fork up to date
3+
id: fork
4+
sidebar_position: 2
5+
---
26

37
You'll want to [keep your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) up-to-date with changes from Talawa's main repositories
48

@@ -14,4 +18,4 @@ Next is pulling the upstream and [pushing the changes](https://docs.github.com/e
1418
```
1519
$ git pull upstream develop
1620
$ git push origin develop
17-
```
21+
```

docs/git-guide/gitworkflow.md renamed to docs/git-guide/git-workflow/setup/introduction.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Using Git as you work
1+
---
2+
title: Introduction
3+
id: introduction
4+
sidebar_position: 1
5+
---
26

3-
## Know what branch you're currently working on
7+
## Know what branch you're currently working on
48

59
When working with Git, it's crucial to know which branch you have currently checked out, Most of the Git commands implicitly operate on the current branch. you can determine the currently checked out branch in several ways:
610

@@ -20,7 +24,7 @@ $ git branch
2024
main
2125
```
2226

23-
You can see more detailed information about your branches, including remote branches, to do the same use, ```git branch -vva```
27+
You can see more detailed information about your branches, including remote branches, to do the same use, `git branch -vva`
2428

2529
```
2630
$ git branch -vva

docs/git-guide/Git working/Stage changes/stage-changes.md renamed to docs/git-guide/git-workflow/stage-changes/introduction.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Stage changes
1+
---
2+
title: Introduction
3+
id: introduction
4+
sidebar_position: 1
5+
---
26

37
Files in Git can have three possible states: committed, modified, and staged.
48

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Stage Changes with git add
3+
id: stage-additions
4+
sidebar_position: 3
5+
---
6+
7+
To add changes to your staging area, use `git add <filename>`. Because `git add` is all about staging the changes you want to commit, you use it to add new files as well as files with changes to your staging area.
8+
9+
Continuing our above example, after we run `git add docs/introduction.md`, we'll see the following from `git status`:
10+
11+
```
12+
13+
On branch issue-178-docsissue
14+
Changes to be committed:
15+
(use "git reset HEAD <file>..." to unstage)
16+
17+
new file: docs/introduction.md
18+
19+
```
20+
21+
You can view the changes in files you have staged with `git diff --cached`. To view changes to files you haven’t yet staged, just `use git diff`.
22+
23+
If you want to add all changes in the working directory, `use git add -A` [(documentation)](https://git-scm.com/docs/git-add).
24+
25+
If you stage a file, you can undo it with `git reset HEAD <filename>`. Here’s an example where we stage a file `test2.md` and then unstage it:
26+
27+
```
28+
$ git add test2.md
29+
On branch issue-234
30+
Changes to be commited:
31+
(use "git reset HEAD <file>..." to unstage)
32+
33+
new file: test2.md
34+
35+
$ git reset HEAD test2.md
36+
$ git status
37+
On branch issue-234
38+
Untracked files:
39+
(use "git add <file>..." to include in what will be commited)
40+
41+
test2.md
42+
43+
nothing added to commit but untracked files present (use "git add" to track)
44+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Stage Changes with git rm
3+
id: stage-deletions
4+
sidebar_position: 4
5+
---
6+
7+
To remove existing files from your repository, use `git rm` [documentation](https://git-scm.com/docs/git-rm). This command can either stage the file for removal from your repository AND delete it from your working directory or just stage the file for deletion and leave it in your working directory.
8+
9+
To stage a file for deletion and remove it from your working directory, `use git rm <filename>`:
10+
11+
```
12+
$ git rm --cached test4.md
13+
rm 'test4.md'
14+
15+
$ git status
16+
On branch issue-100
17+
Changes to be commited:
18+
(use "git reset HEAD <file>..." to unstage)
19+
20+
deleted: test4.md
21+
22+
$ ls test4.md
23+
test4.md
24+
25+
```
26+
27+
If you stage a file for deletion with the `--cached option`, and haven’t yet run `git commit`, you can undo it with `git reset HEAD <filename>`:
28+
29+
```
30+
$ git reset HEAD test4.md
31+
```
32+
33+
Unfortunately, you can’t restore a file deleted with `git rm` if you didn’t use the `--cache` option. However, `git rm` only deletes files it knows about. Files you have never added to Git won’t be deleted.

docs/git-guide/Git working/Stage changes/status.md renamed to docs/git-guide/git-workflow/stage-changes/status.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Get status of working directory
1+
---
2+
title: Get status of working directory
3+
id: get-status
4+
sidebar_position: 2
5+
---
26

3-
To see what files in the working directory have changes that have not been staged, use ```git status```.
7+
To see what files in the working directory have changes that have not been staged, use `git status`.
48

59
If you have no changes in the working directory, you’ll see something like this:
610

@@ -16,8 +20,8 @@ If you have unstaged changes, you’ll see something like this:
1620
On branch issue-178-docsissue
1721
Untracked files:
1822
(use "git add <file>..." to include in what will be committed)
19-
23+
2024
docs/introduction.md
2125
22-
nothing added to commit but untracked files present (use "git add" to track)
23-
```
26+
nothing added to commit but untracked files present (use "git add" to track)
27+
```

docs/git-guide/collaborate.md renamed to docs/git-guide/introduction/collaborate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Collaborate
1+
---
2+
id: collaborate
3+
title: Collaborate
4+
sidebar_position: 5
5+
---
26

37
## Fetching work of other Contributors
48

@@ -37,4 +41,4 @@ Now switch to the branch
3741
$ git checkout BRANCHNAME
3842
```
3943

40-
Now you can work on this branch as you normally work in other branch.
44+
Now you can work on this branch as you normally work in other branch.

docs/git-guide/get-the-code.md renamed to docs/git-guide/introduction/get-the-code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
id: get-the-code
33
title: Get The Code
4+
sidebar_position: 3
45
---
56

67
Each of our projects use a **forked-repo** and **merge-oriented** workflow. This means all contributors create a fork of the repository they want to contribute to and then submit pull requests to the upstream repository to have their contributions reviewed and accepted. We also recommend you work on feature branches.

0 commit comments

Comments
 (0)