Skip to content

Commit 334e677

Browse files
committed
inclusion of the documentation folder
1 parent 4019cd0 commit 334e677

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Git Empty Commit Documentation
2+
3+
## Description
4+
5+
The following documentation outlines how to send an empty commit to trigger various kinds of things in a repository.
6+
7+
## Git Empty Commit
8+
9+
So, if we want to send an empty commit, we want to have something like the following in the terminal.
10+
11+
`git commit --allow-empty -m "Empty commit"`
12+
13+
`git push`
14+
15+
If you are still having issues, refer to the following documentation [link](https://coderwall.com/p/vkdekq/git-commit-allow-empty).
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Git Squash Documentation
2+
3+
## Description
4+
5+
The following documentation outlines how to Git Squash.
6+
7+
## Git Squash Commits with Git Graph
8+
9+
The following outlines how to Git Squash multiple commits easily in VS Code.
10+
11+
So, let's say we want to Git Squash to the base branch of our pr, we take note of the commit number `69d81e38`
12+
13+
<p><img src="../images/baseCommitInPr.png" width="800"/></p>
14+
15+
So, we got to Git Graph in VS Code and then we look for that commit number and then go to one just before that and we want to do something like the following where we `reset` the current branch.
16+
17+
<p><img src="../images/resetCurrentBranch.png" width="800"/></p>
18+
19+
You want to click `Mixed` as the reset.
20+
21+
<p><img src="../images/mixedReset.png" width="800"/></p>
22+
23+
Once, that is reset, use `git add`, `git commit` and `git push` as normal and then you should see on Github that your branch has been squashed into one commit.
24+
25+
If you are still having issues, refer to the following documentation [link](https://dannyherran.com/2020/06/git-squash-commit-vs-code/#:~:text=Right%2Dclick%20the%20commit%20that,current%20branch%20to%20this%20commit%E2%80%A6%E2%80%9D).
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Git Worktree Documentation
2+
3+
## Description
4+
5+
The following documentation outlines how to use Git Worktree.
6+
7+
## Git Worktree
8+
9+
The following outlines how to `git worktree` that allows you look at another branches contents without needing to checkout to that branch. If you type `git worktree` in your terminal, you will see a list of commands you can use.
10+
11+
So, let's say we want to look at the contents of a branch called `test/labels`. we would do the following of either
12+
13+
1). `git worktree add worktreeBranch test/labels`
14+
15+
This will add the contents of the branch to a folder called `worktreeBranch` to your current folder.
16+
17+
or
18+
19+
2). `git worktree add ../worktreeBranch test/labels`
20+
21+
This will add the contents of the branch to a folder called `worktreeBranch` to your current folder but moved up by one directory. There may be cases this may be more useful as you can open this in a new window, which will make it easier to differentiate the two branches.
22+
23+
To list your current worktree's, use the following command `git worktree list`.
24+
25+
To remove any old worktrees you no longer need use the following command to git rid of the example we used, which was `worktreeBranch`.
26+
27+
`git worktree remove worktreeBranch`.
28+
29+
If you are still having issues, refer to the following video [link](https://www.youtube.com/watch?v=cRunWRC8ye0).

0 commit comments

Comments
 (0)