Try   HackMD

2023-05-16-NCL Version Control with Git

This document:

https://hackmd.io/@rseteam-ncl/2023-05-16-NCL

JupyterHub:

https://jupyter.ncldata.dev

We asked for your uni login when you registered. Please use that to login - it is case sensitive. You don't have a password yet. The password you enter the first time you log in will become your password.

Introduction

  • Instructors
  • Helpers
  • What is The Carpentries
  • What is the RSE Team
  • Coffee breaks and lunch
    • Morning break: 11:00
    • Lunch: 13:00
    • Afternoon break: 15:30

Attendance:

Please sign in using your university email and your name:

  1. frances.turner@newcastle.ac.uk, Frances Turner
  2. l.a.bruce@newcastle.ac.uk, Lawrence Bruce
  3. s.lane4@newcastle.ac.uk, Stephen Lane
  4. s.coaster@newcastle.ac.uk, Samual Coaster
  5. n.allen1@ncl.ac.uk, Nicholas Allen
  6. e.collinson@newcastle.ac.uk, Ethan Collinson
  7. a.bell16@newcastle.ac.uk, Alexander Bell
  8. bethany.little@newcastle.ac.uk, Beth Little
  9. n.s.a.altwala2@newcastle.ac.uk, Nada Altwala
  10. h.kamali2@newcastle.ac.uk, Hasti Kamali

Cheat Sheet: command line

cd change directory
ls list contents of directory
mkdir directory_name make directory
rm filename remove file
pwd print current working directory
touch create a blank file
nano filename create and/or open file with the nano text editor
mv filename newfilename move file or rename file (if in the same location)

Cheat Sheet: git

git init make a new repository
git add stage file(s) for committing
git commit -m "message" commit any staged files
git commit -a stage and commit all files that have been modified or created
git push remotebranchname localbranchname push changes to a remote repository
git pull remotebranchname localbranchname pull changes from a remote repository
git checkout -b branchname create a new branch and switch to it
git checkout branchname switch to an existing branch