| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Add and Change Git Repository

Page history last edited by MrTundraMan 10 years, 11 months ago

Git Reference Pages

 

 

Git Repositories

 

  • git@github.com:douggilliland/Dougs-Arduino-Stuff.git
  • git@github.com:douggilliland/DougsPCBDesigns.git

  • git@github.com:douggilliland/DougsPrintedParts.git

  • git@github.com:douggilliland/DougsWoodWorld.git

 

Creating a repo

 

  • In the directory
    • git init

 

Looking at log

 

  • git log

 

Pulling changes from a server made by someone else or you from another computer

 

  • In the directory
    •  git fetch origin
    • git rebase origin/master
  • Manually fix any conflicts
    • git rebase --continue

 

Adding to an existing (local) git repository (Linux command line)

 

  • In a terminal.
    • cd ~/arduino-1.0.1/Projects
  • Make the change to the source file. 
  • git add .
    • Adds all the files that are to be added recursively from the Projects folder (due to .)
  • (Alternately) git add -u
    • Does update (seemed to have deleted moved files from the old location which is a good thing),
  • git commit -m 'Changed something not important'
    • Gets back something like:
      • [master 090f893] Changed something not important
         2 files changed, 153 insertions(+), 76 deletions(-)
         create mode 100644 cylon/Cylon_Warrior_03/Cylon_Warrior_03.ino~

 

Pushing changes to a remote repository (github)

 

  • git push
    • Gets back something like:
      • Counting objects: 9, done.
        Compressing objects: 100% (4/4), done.
        Writing objects: 100% (5/5), 746 bytes, done.
        Total 5 (delta 2), reused 0 (delta 0)
        To git@github.com:douggilliland/Dougs-Arduino-Stuff.git
           952a95d..090f893  master -> master

 

Clone folder to a new machine

 

 

Getting files from Repository onto local machine

 

  • git pull

 

Comments (0)

You don't have permission to comment on this page.