> See also:
> - [[UNIX Terminals]]
> - [[UNIX Terminals]]
# Git Version Control
[Git Documentation](https://git-scm.com/docs)
## Version Control Fundamentals
> [!NOTE]+ Pull vs Fetch
> ![[Pasted image 20231216185104.png|400]]
>
> `git pull`
> - aaa
> ---
> `git fetch`
> - a
>
> [!NOTE]+ Merge vs Rebase
> ![[Pasted image 20231216185700.png|550]]
> `git pull --rebase`
> - aaa
> ---
> `git merge`
> - aaa
> [!abstract]+ Making/Editing Commits
> `git reset --soft HEAD^`
> - Useful if a commit has already been made (locally) and a pull attempt is made that results in a merge conflict.
> - This will remove the commit but keep all of the changes you had made in it.
> ---
> `git commit --amend`
> - Useful if you already staged a local commit (but haven't pushed it) and want to add additional changes to it.
> - Any changes outside of the commit that are staged will be added to the existing commit
> ---
> `git clean -fdx`
> - Removes all untracked files (useful if your text editor generates a bunch of junk).
> - f (force)
> - d (directories)
> - x (ignored files)
> ---
> `git config --global core.excludesfile ./[directory name]`
> - Specifies a `.gitignore` file which can be modified to exclude certain file/folder types from being tracked by git repositories.
**killme’s custom commit log commands:**
- `git lg`
- `git lg1`
- `git lg2`
+
## GitHub Tips
When wanting to fork a public repository while still being able to merge later updates into your forked repo: