The pre-class assignment was very long. We will take this into account when awarding credit.
gitwork for me
We will work on this over time, so we can all get better at it.
gitis the standard version control system for data science work¶
git init- Initalize a new
gitrepo on your local machine; used only once to tell your OS this directory is going to be a
gitrepo. Creates a
.gitdirectory for that purpose.
git clone <URL>- Clone an existing repo located at
<URL>; used only once to download the repository including the files of the most recent commit and the history prior to that commit.
git add <FILE>- Adds file to a new commit; only puts the file into a staging area for commit.
git add -a- the
-aflag adds all changed files to a new commit; it's faster, but be careful with this
git commit -m "MESSAGE"- commits your file to your local repo; this makes no changes to the remote repo (e.g., on github). The
MESSAGEshould be informative about your changes.
git push- Pushes your changes to the remote repository so everyone else can see them.
git pull- Pulls changes from the remote repository to your repo and local machine.
GitHub Desktop is available for free. It's built for
github.com and it has all the commands you use in the CLI.