Skip to content

DSC-MtA/Git-Started

Repository files navigation

Git Started!

Cranky's Advice

Pre-mission requirement

Install Git onto your device

Linux

  • Debian:
     sudo apt-get install git
    

Mac OS

  • .dmg installer
  • Brew:
     ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
     brew install git
    

Windows

Today's mission

To learn the basics of version control by editing a single file simultaneously with many others!

Part 1 (Optional)

Complete the following Katacoda Scenarios :

  1. Committing Files
  2. Committing Changes
  3. Working Remotely
  4. Undoing Changes
  5. Fixing Merge Conflicts
  6. Experiments Using Branches

Part 2

Clone a copy of this repository and some add information about yourself to Participants.md, and include a secret!

    For your bio information, include your academic year, focus of study, and home town/city.

FlowChart1

Part 3

Hide your secret using the powers of version control!

FlowChart2

Part 4

Explore this repositories commit history to look at your changes and learn about your fellow DSC members!

🛠️ Recommended tools 🛠️

Create a branch

     git branch <name of branch>

Checkout a branch

     git checkout <name of branch>

Create and checkout a branch

     git checkout -b <name of branch>

Pull changes from remote branch into local branch

     git pull

Stage a file

     git add <name of file>

Commit a file

     git commit -m "a commit message"

Push a file to a new remote branch

     git push --set-upstream origin <name of branch>

Push a file to an existing remote branch

     git push

Revert a commit

       git revert <commit hash>

Save your username and password in git (Warning! This involves a potential security risk!)

       git config credential.helper store