Reference
Bash shell commands
Command line cheat sheet from Tower
pwd
: print working directory
ls
: list contents of directory
cd
: change directory
mkdir
: make directory
cat
: send file or files to output (in most cases, print to shell)
head
: output first parts of a file or files
tail
: output last parts of a file or files
mv
: rename or move a file or files. Syntax for renaming a file: mv FILENAME NEWFILENAME
cp
: copy a file or files. Syntax: cp FILENAME NEWFILENAME
>
: redirect output. Syntax with cat
: cat FILENAME1 FILENAME2 > NEWFILENAME
rm
: remove a file or files. USE WITH CAUTION!!!
Git commands
git init
: create a new local git repository
git status
- view the status of your files in the working directory and staging area
git add
- tell git to start tracking a file, or a series of files
git commit
- save file changes from the staging area permanently to the project history
git push
- upload all commits to a remote repository, such as GitHub
git log
- show history of commits in reverse chronological order
git diff
- show changes made to tracked files
git pull
- download upstream changes and merge them into your local repository
git remote add origin
- add a remote repository named ‘origin’, to upload changes to or download changes from
Markdown
- GitHub Guide to Mastering Markdown
- Markdown cheat-sheet for quick reference
Getting Started With Git
- An author at Webtuu.com provided both a clear introduction to git for absolute beginners and a follow-up git basics and branching blog post
- This recent Git guide for beginners covers the basics and includes tips for both Github and Gitlab
- For more in-depth coverage, Scott Chacon and Ben Straub’s “Pro Git” book is available as an online resource here
Hands-on Learning and Guides for Git
- The GitHub help pages are a good place to start
- GitHub has ‘activities’ which aim to explain how git works
- GitHub also has interactive tutorials for their online version (Learning Labs) and for using Git offline (Git-It)
- Atlassian has in depth and clear tutorials on using Git
- “Dang It, Git” provides a great quick walkthrough of how to fix common errors for Git beginners
Getting Started with Docker
- Docker Tutorial for Beginners in 1 hour by Mosh on Youtube
- Docker Tutorial for Beginners in 3 Hours on Youtube
- Carpentries lesson on Reproducible computational environments using containers will introduce Singularity which is a containerization solution tailored for scientific and HPC workloads
- Check out other Community Developed lessons on Carpentries