git clone to create a local copy of a remote repository.git init..git will be created to track diffs, etc. git add to place files in the
staging area.git commit -m "Commit Message" to commit the changes.git push. git status to
make sure all changes have been added to the staging area. .gitignore
file to keep them out of your status output..gitignore provides a list of specific files - or patterns
using file globs - that git should ignore.git add -f. .gitignore at a minimum:.* : all hidden files*~ : temporary backups created by Emacs.DS_store: if you ever work on Mac*.log *.out . git push.git fetch. git pull. git remote:git remote add origin git@github.com:user/repo.gitgit push -u origin main.git clone. git pull to sync local with remote,git add, git status, git commitgit pushmain after completing a logical chunk of work. git pull performs a merge automatically when able.git diff can be used to compare a file to the index (staging area)git diff can also be used to compare two files on disk among other uses.git checkout can be used to discard local changes and restore a file
to the version in the index. git init --bare to initialize a bare repository.507_afs in our AFS space.ssh user@login.itd.umich.edumkdir git_remotesmkdir git_remotes/507_afs.gitcd git_remotes/507_afs.git,git init --bare. mkdir ~/git,cd ~/git.git clone /afs/umich.edu/user/u/n/unique_name/git_remotes/507_afs.git.cd 507_afsecho "## About" > README.mdgit add README.mdgit statusgit commit -m "Initial commit.git branch -m master maingit push -u origin maingit clone unique_name@login.itd.umich.edu:/afs/umich.edu/users/u/n/unique_name/git_remotes/507_afs.gitgit branch <name>.git branch.git checkout to switch branches.git merge.git checkout.git clone to copy an existing repo.git pull to fetch and merge changes from remote to local.git add, git status, git commit to commit changes to the version
history.git push to send your changes to the upstream remote.