Git is a way to upload your packages onto a version control system of your choice (as in either [Gitlab](obsidian://open?vault=Obsidian&file=Coding%20Tips%2FComputers%2FInternet%2FTools%2FGitlab), Github, or other version control site of your choice). Official [docs for git found here](https://git-scm.com/doc).
- Find .git directories in the current working directory, you can use a `.` instead of a path. This will search in the current directory as well as all subdirectories:
```
find . -type d -name '.git'
```
- Seeing revision history is pretty important. This is able to done through the git-log command.
This often leads to the following warning message:
`Note: switching to 'remotes/name/main'.
`You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command.
Example:
```git switch -c <new-branch-name> ```
Or undo this operation with:
`git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 10b9410 does this do anything?
---
- List all remote branches
```
git remote
```
#### Example: Pushing this obsidian onto gitlab
If you're reading this on said gitlab, well this might be a bit meta then:
```
# To permanently cache the credentials
git config --global credential.helper osxkeychain
# To ignore files that could cause issues across different workspaces
touch .gitignore
echo ".obsidian/cache
.trash/
.DS_Store" > .gitignore
# Making out local ZettelKasten into a local Git Repository
git init
git add.
git commit -m "init"
# Pushing our local repository into our remote repository on GitHub