edit-article
Home
Up
Delete
Article Name:
Article Description:
[SITE] official site for git, ] has in browser demo(by Code__) you can use to learn/try git, ] LISTS git clients for all platforms that you can download ] git source code
Chapter ID/Name:
Status:
Write
Writing
Written
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">title</h1> <h2>[WHAT]</h2> <ol> <li>] official site for git, ] has in browser demo you can try, ] LISTS git clients for all platforms that you can download ] git source</li> </ol> <h2>[WHY]</h2> <ol> <li>] </li> </ol> <h2>[WHERE]</h2> <ol> <li><strong>] > git status </strong></li> <ol> <li>] displays</li> </ol> <li><strong>] > git add</strong></li> <ol> <li>] adds a file to the "staging area" of your local repo</li> <li>] include a descriptive message</li> </ol> <li><strong>] > git commit </strong></li> <ol> <li>] moves the file from the staging area to</li> <li>] include a descriptive message</li> </ol> <li><strong>] > git log</strong></li> <ol> <li>] displays a history of commits with auther and</li> </ol> <li>]</li> <li>]</li> <li>]</li> <li>]</li> <li>]</li> <li><strong>] > git remote add origin <a href="https://github.com/try-git/try_git.git">https://github.com/try-git/try_git.git</a></strong></li> <ol> <li>]</li> </ol> <li><strong>] > git push -u origin master</strong></li> <ol> <li>] The push command tells Git where to put our commits when we're ready. So let's push our local changes to our origin repo (on GitHub).</li> <li>] The name of our remote is origin and the default local branch name is master. The -u tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do. Go ahead and push it!</li> </ol> <li><strong>] git pull origin master</strong></li> <ol> <li>] Let's pretend some time has passed. We've invited other people to our github project who have pulled your changes, made their own commits, and pushed them. We can check for changes on our GitHub repository and pull down any new changes by running:</li> </ol> <li><strong>] git diff HEAD</strong></li> <ol> <li>Uh oh, looks like there has been some additions and changes to the octocat family. Let's take a look at what is different from our last commit by using the git diff command. In this case we want the diff of our most recent commit, which we can refer to using the HEAD pointer.</li> </ol> <li><strong>] git add octofamily/octodog.txt</strong></li> <ol> <li>Staged Differences . Another great use for diff is looking at changes within files that have already been staged. Remember, staged files are files we have told git that are ready to be committed. Let's use git add to stage octofamily/octodog.txt, which I just added to the family for you.</li> </ol></ol> <h2>[WHEN]</h2> <ol> <li>]</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>]</li> </ol> <h2>[HOW-TO]</h2> <ol> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol> <li>]</li> </ol> <h1 style="text-align: center;"> </h1>