Skip to content

Commit 576c368

Browse files
committed
fixed some weird newline issues
1 parent 99c1846 commit 576c368

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

basic_git.md

+29-27
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Setting Up
22

33
### 1. Navigate to where you want to put your local repository
4-
`cd your_file_location`
4+
`cd your_file_location`<br/>
55

66
### 2. Clone the repository
77
(this will create the directory inside of the directory you navigated to in step #1)
8-
`git clone the_link_from_GitHub`
8+
`git clone the_link_from_GitHub`<br/>
99

1010
### 3. Start the flow below! :)
1111

@@ -14,55 +14,57 @@
1414

1515
When starting a new feature:
1616
### 1. Start from the `master` branch
17-
`git branch` -> lists all branches you're tracking locally, with an asterisk by the branch you're on
18-
`git checkout master` -> switches to `master` branch
17+
`git branch` -> lists all branches you're tracking locally, with an asterisk by the branch you're on<br/>
18+
`git checkout master` -> switches to `master` branch<br/>
1919

2020
### 2. Pull in the latest merged changes from the remote tracking branch on GitHub
21-
`git pull origin master` -> pulls all commits from remote `master` branch into the branch you are currently on
22-
(in this case, into `master` branch)
21+
`git pull origin master` -> pulls all commits from remote `master` branch into the branch you are currently on<br/>
22+
(in this case, into `master` branch)<br/>
2323

2424
### 3. From the `master` branch, checkout a new feature branch and do your work locally in it
25-
`git checkout -b your_feature_branch_name` -> creates new branch from current branch (with commits from current branch)
26-
Also:
27-
`git checkout other_branch_name` -> switches from your current branch to another branch
28-
`git branch` -> shows you which branch you're currently working in
25+
`git checkout -b your_feature_branch_name` -> creates new branch from current branch (with commits from current branch)<br/>
26+
27+
Also:<br/>
28+
`git checkout other_branch_name` -> switches from your current branch to another branch<br/>
29+
`git branch` -> shows you which branch you're currently working in<br/>
2930

3031
### 4. Check your changes; determine out what you want to include in the commit
31-
`git status` -> will show all files changed
32-
`git diff` -> will show specific lines changed
32+
`git status` -> will show all files changed<br/>
33+
`git diff` -> will show specific lines changed<br/>
3334

3435
### 5. Add and commit your changes within your development/feature branch
35-
`git add specific_files` or `git add .` (for all files) -> select files to include
36-
`git commit -m 'your_message_in_here'` -> to include a helpful message with your commit
37-
(if you make a mistake, you can `git reset HEAD~` to revert)
36+
`git add specific_files` or `git add .` (for all files) -> select files to include<br/>
37+
`git commit -m 'your_message_in_here'` -> to include a helpful message with your commit<br/>
38+
(if you make a mistake, you can `git reset HEAD~` to revert)<br/>
3839

3940
### 6. Push changes from your local development branch up to share with others/for review to merge in
40-
`git push origin your_feature_branch_name` -> pushes whatever changes you've saved locally in this branch to your remote tracking branch on GitHub with the same name
41+
`git push origin your_feature_branch_name` -> pushes whatever changes you've saved locally in this branch to your remote tracking branch on GitHub with the same name<br/>
4142

4243
### 7. Submit Pull Requests for other people to review; if approved, merge into `master` branch via GitHub site
4344

4445

4546
## Handling Potential Merge Conflicts
4647
If there are merge conflicts, GitHub will not let you merge via the site before handling them. Hopefully this will not happen. If it does:
47-
* `git pull origin master` (pulls in the latest changes from master)
48-
* `git status` -> will show any merge conflicts (specifically, the files that'll need to be resolved)
49-
* Open the files in your selected text editor (MonoDevelop/Sublime/etc.) to intelligibly determine which changes to keep and what lines to remove.
48+
* `git pull origin master` (pulls in the latest changes from master)<br/>
49+
* `git status` -> will show any merge conflicts (specifically, the files that'll need to be resolved)<br/>
50+
* Open the files in your selected text editor (MonoDevelop/Sublime/etc.) to intelligibly determine which changes to keep and what lines to remove.<br/>
5051

5152
Then, add/commit/push your new commits:
52-
* `git add .`
53-
* `git commit -m "your commit message"`
54-
* `git push origin target_branch`
53+
* `git add .`<br/>
54+
* `git commit -m "your commit message"`<br/>
55+
* `git push origin target_branch`<br/>
5556

5657

5758
## Miscellaneous Commands (that you probably don't need but may be useful)
5859

5960
### Deleting an old local branch
60-
`git branch -D your_branch_name` -> to delete old branches no longer in use (this isn't really necessary)
61+
`git branch -D your_branch_name` -> to delete old branches no longer in use (this isn't really necessary)<br/>
6162

6263
### Rebasing
63-
`git rebase -i HEAD~` -> an example of this command... rebasing can be used to clean up your git commit history, squash multiple commits together, skip select commits, reword your commit message, etc.
64+
`git rebase -i HEAD~` -> an example of this command... rebasing can be used to clean up your git commit history, squash multiple commits together, skip select commits, reword your commit message, etc.<br/>
6465

6566
### Stashing (and Applying) Changes
66-
This is useful for many things! Oftentimes I use this for temporarily saving my changes, merging in new changes that other people have made, then applying my changes atop those merged in changes. There are more complex and powerful use cases than this though!
67-
`git stash` -> temporarily saves your changes and reverts your working directory to match the HEAD commit
68-
`git stash apply` -> re-applies those changes
67+
This is useful for many things! Oftentimes I use this for temporarily saving my changes, merging in new changes that other people have made, then applying my changes atop those merged in changes. There are more complex and powerful use cases than this though!<br/>
68+
69+
`git stash` -> temporarily saves your changes and reverts your working directory to match the HEAD commit<br/>
70+
`git stash apply` -> re-applies those changes<br/>

0 commit comments

Comments
 (0)