article

git going - scenarios

[WHAT]

  1. ] by Don Sagrott, founder @sospep.com - this article outlines some common use case scenarios for working with git SCM software and remote code hosting repo's like github.com

[WHY]

[WHERE]

  1. ] READ THE FULL ARTICLE
    1. ] see the EXAMPLE section below

[WHEN]

  1. ] 2017-05-01

[EXAMPLE]

  1. [SCENARIO-001] CREATE a new repo on your local machine, then PUSH it to your own hosted REMOTE repo 
    1. [00:00] EXAMPLE OUTLINE PROCESS = # steps, ] 
      1. ] using bash, navigate to the directory where you wish to copy the files into
      2. ] git init, 
      3. ] git add,
      4. ] git commit
      5. ] git push ( from local to your remote repo)
      6. ] git pull ( from remote repo to your local machine)
    2. [EXAMPLE =] 
      1. ] sospep/guide 
  2. [SCENARIO-002] CLONE an existing repo to your local machine, then PUSH your UPDATES back to the orig repo
    1. [00:00] EXAMPLE OUTLINE PROCESS = # steps, ] 
      1. ] using bash, navigate to the directory where you wish to copy the files into
      2. ] git clone {path} 
      3. ] EDIT source 
    2. [00:00] NEW task
      1. x] launch bash and navigate to the directory where you want the repo to exist on your local machine
      2. x] > sh.exe --login
    3. [00:00] NEW task
      1. ] ENTER the following command in bash, where {path} is the URL generated by the 'clone' button in github
      2. ] git clone {URL-cool-git-project}
      3. ] git clone http://github.com/tastejs/todoMVC.git
    4. [00:00] NEW task EDIT SOURCE
      1. ] EDIT-SOURCE - see EDIT process
    5. [00:00] NEW task
      1. ] push changes back to the main repo || submit pull request
    6. [EXAMPLE=]
    7. [REFERENCE]
      1. ] http://stackoverflow.com/questions/651038/how-do-you-clone-a-git-repository-into-a-specific-folder
  3. [SCENARIO-003] FORK an existing repo
    1. *] this make a copy of the repo you want on your github account
    2. x] ?download? to your local machine USING ___
    3. x] edit source - git add, git commit, 
    4. [EXAMPLE=]
      1. x] sospep/what-happens-when
    5. [REFERENCE=]
  4. [SCENARIO-004] CLONE an existing remote repo to your local machine, then PUSH it back to your own REMOTE repo
    1. [00:00] WHAT = 
      1. ] clone a remote repo to your local machine, then PUSH it back(aka CREATE) your own REMOTE repo with some of the original projects contents
      2. ] EASIER = ] fork project @remote host ] clone fork (to localMachine), { ] EDIT source local }, ] push myfork, { ] submit pull request orig project } 
    2. [00:00] EXAMPLE OUTLINE PROCESS = 6 steps, ] local repo, ] clone remote repo, ] remote add, ] remote set-url, ] create repo on your ..., ] git push 
      1. *] using bash navigate to the local directory where you want the cloned app to live
      2. x] git clone {url}
      3. x] git remote add {name} {url}
      4. x] git remote set-url origin {URL-remote-repo}
      5. x] USE github.com UI to manually create repository  
      6. x] git push {name} {branch} || git push -u origin master
    3. [00:00] NEW procedure IN prj-035-git-started/using-git/
      1. x] # 452 - LIST-steps - detailed step by step process for cloning a remote repository to your local machine
  5. ] EDIT source 
    1. ] EXAMPLE
    2. x] use VScode editor to change "index.html" ( triplicate line about "we now have 64 applications" 
    3. x] git add -A ( all changes)
    4. x] git commit -a ( use "am" to get a different editor than vi to enter your commit msg)
    5. ] push changes back to a different repo

[HOW-TO]

  1. [00:00] NEW task 
    1. *] SUCCESS - your project should be live on github, ready for any changes you make locally,
    2. ] you can take your git SKILLS to the next level, but its entirely up to you wether to ADVANCE or not, typically if you plan to have multiple contributors to your source base, you will
  2. [00:00] NEW task IN 
    1. ] clone - any exisiting repository into your local machine
    2. ] navigate to directory where you wish to copy the files into
    3. ] ENTER the following command in bash, where {path} is the URL generated by the 'clone' button in github
    4. ] git clone {path} .

[REFERENCE]

  1. x] # 7282 - CREATE-article# 5729 - 

[RELATED]

  1. ] BOOK - git-started - contents 

 

Details Photos Edit more

Details

ID: 5729

NAME: 001-git-going-scenarios

DESCRIPTION: ] an outline of some different git usage scenarios

AUTHOR: article.author/s

EDITOR: article.editor/s

PUBLISHER: article.publisher/s

STATUS: Write

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

page_photo

actions

Email Email-Owner SMS and