#Some basic commands for starting with git:
gi๐ ๐ถ๐ป๐ถ๐
#initializes a new Git repository in your current directory.
๐ด๐ถ๐ ๐ฐ๐น๐ผ๐ป๐ฒ <๐ฟ๐ฒ๐ฝ๐ผ>
# clone (copy) it to the machine your working on
#๐ ๐ฎ๐ธ๐ฒ ๐๐ต๐ฎ๐ป๐ด๐ฒ๐
๐ด๐ถ๐ ๐๐๐ฎ๐๐๐
#It is a recommended practice to review the status of your files before or after making changes. Easily identify any modifications that have not been staged yet.
๐ด๐ถ๐ ๐ฎ๐ฑ๐ฑ <๐ณ๐ถ๐น๐ฒ๐ป๐ฎ๐บ๐ฒ>
# stage files for a commit.
๐ด๐ถ๐ ๐ฎ๐ฑ๐ฑ .
๐ด๐ถ๐ ๐ฎ๐ฑ๐ฑ -๐
#add all changed files to the stage
๐ด๐ถ๐ ๐ฐ๐ผ๐บ๐บ๐ถ๐ -๐บ "commit message"
#commit files with a descriptive message.
#๐๐ฟ๐ฎ๐ป๐ฐ๐ต๐ถ๐ป๐ด
๐ด๐ถ๐ ๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต
# list all the local branches in current repo
๐ด๐ถ๐ ๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต <๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต๐ป๐ฎ๐บ๐ฒ>
#create new branch
git checkout
# Change to another branch
git merge
#merge changes to (usually master) main branch
#๐ฅ๐ฒ๐บ๐ผ๐๐ฒ ๐ฅ๐ฒ๐ฝ๐ผ๐๐ถ๐๐ผ๐ฟ๐ถ๐ฒ๐
git remote add origin
๐ด๐ถ๐ ๐ฟ๐ฒ๐บ๐ผ๐๐ฒ -๐
#check which remote servers are connected with your local repository.
#connect to remote repo. Can also use:
git remote set-url --add
git remote set-url --delete
๐ด๐ถ๐ ๐ฝ๐๐๐ต ๐ผ๐ฟ๐ถ๐ด๐ถ๐ป <๐ฏ๐ฟ๐ฎ๐ป๐ฐ๐ต๐ป๐ฎ๐บ๐ฒ>
#This command sends your commits to the remote repository.
๐ด๐ถ๐ ๐ฝ๐๐น๐น
#Pull will grab and merge any changes from the remote repository.
git fetch
#downloads changes from a remote repository without integrating them. git pull incorporates downloaded changes by merging them into the local files.
git merge
#combines branches by creating a new commit, preserving the commit history.
git rebase
#moves or combines commits onto a new base
git reset
#discards local changes completely by moving the branch pointer.
git revert
#undoes changes by creating a new commit that reverses the effects, preserving the commit history.
#example to add one file to repo from working machine, where git is initialized.
git add shopping_list.yml
git commit -m "new file"
git push origin main
#.gitignore:
#The .gitignore file is used to exclude certain files and directories from being tracked by Git.
#It uses pattern matching rules to specify what should be ignored.
#By adding filenames, extensions, or directory names to the .gitignore file,
#you can prevent them from being committed and pushed to the repository.
#This helps keep the repository clean and avoids including irrelevant or sensitive files in the version history.
Setup jump host with VPN client
Setting up a jump host VPN client to access your network.