first pass spellings

This commit is contained in:
Ric Harvey 2024-05-03 11:36:32 +01:00
parent 1b67f5d800
commit 4a52040a0a
Signed by: ric
GPG key ID: CD63CE502B962F16

View file

@ -9,7 +9,7 @@ git add <filename>
Now when you do a commit this file will be tracked and if you make changes to it in the future that will be tracked also. You only need to add the file once. Now when you do a commit this file will be tracked and if you make changes to it in the future that will be tracked also. You only need to add the file once.
Now heres a short cut for you, if you want to add all the files in a directory you can run the following to save you a lot of time. Now here's a short cut for you, if you want to add all the files in a directory you can run the following to save you a lot of time.
```bash ```bash
# Add all files in the git repo # Add all files in the git repo
@ -20,7 +20,7 @@ git add .
### Excluding files ### Excluding files
There are times when you want to exclude certain files from your git repository. These could be credential files or something more harmless like ```_DS_Store``` folders that get created when you look at images. A ```.gitignore``` file specifies intentionally untracked files that Git should ignore, and thus keeps those files from being commited even when you run ```git add .```. To create this file: There are times when you want to exclude certain files from your git repository. These could be credential files or something more harmless like ```_DS_Store``` folders that get created when you look at images. A ```.gitignore``` file specifies intentionally untracked files that Git should ignore, and thus keeps those files from being committed even when you run ```git add .```. To create this file:
- Make sure you are in the root of your git repository - Make sure you are in the root of your git repository
- create a new file called ```.gitignore``` - create a new file called ```.gitignore```
@ -73,7 +73,7 @@ git rm --cached <filename>
## Commits ## Commits
When working with commits it's good practice to add a commit message that describes the changes you've made. This is also why it's good to make frequent commits and split your work into smaller units of work, meaning the commit message is simpler to create and more accurate. There are a coupole of ways you can add the commit message from the command line, the first isthe way I tend to use because you get to see a nice easy to read list of things that have changed and maybe files you've forgot to include. It opens up your default text editor for you to write the commit message in, yet again in my case this is vim. If you are wondering how to exit vim it's ``ESC`` then ``:wq``. This commit in this way do the following: When working with commits it's good practice to add a commit message that describes the changes you've made. This is also why it's good to make frequent commits and split your work into smaller units of work, meaning the commit message is simpler to create and more accurate. There are a couple of ways you can add the commit message from the command line, the first is the way I tend to use because you get to see a nice easy to read list of things that have changed and maybe files you've forgot to include. It opens up your default text editor for you to write the commit message in, yet again in my case this is vim. If you are wondering how to exit vim it's ``ESC`` then ``:wq``. This commit in this way do the following:
```bash ```bash
git commit -a git commit -a
@ -86,7 +86,7 @@ However, some people prefer to add their commit message on the command line for
git commit -m "meaningful message" git commit -m "meaningful message"
``` ```
> If you've followed the advanced guide and set up GPG signing of your code you will be promted for your GPG password at this point > If you've followed the advanced guide and set up GPG signing of your code you will be prompted for your GPG password at this point
If you realise you've made a mistake and want to change the last commit, you don't have to create a new commit, you can use the ```-—amend``` flag to amend the most recent commit If you realise you've made a mistake and want to change the last commit, you don't have to create a new commit, you can use the ```-—amend``` flag to amend the most recent commit
@ -102,7 +102,7 @@ As a rule of thumb its good practice to commit frequently, thus avoiding loss
### Sync Commits to the Remote Repository ### Sync Commits to the Remote Repository
Right so you're commited this is good. If you remember back to our diagram about the stages of a git repository you've now moved the files into the local repository. It's now time to sync them back up to the remote repository. Now this is pretty simple just run the following command: Right so you're committed this is good. If you remember back to our diagram about the stages of a git repository you've now moved the files into the local repository. It's now time to sync them back up to the remote repository. Now this is pretty simple just run the following command:
```bash ```bash
git push git push