项目作者: ai-gaanv

项目描述 :
Repository for GIT Basic(s), first pull request(s), first contribution(s)
高级语言:
项目地址: git://github.com/ai-gaanv/Hello-GitHub.git
创建时间: 2019-10-21T20:55:25Z
项目社区:https://github.com/ai-gaanv/Hello-GitHub

开源协议:

下载


Hello-GitHub

Repository for GIT Basic(s), first pull request(s), first contribution(s)

‘How-To’ Create a copy / clone of repository

  1. git clone <URL of Repository>
  2. Example:
  3. git clone https://github.com/ai-gaanv/Hello-GitHub.git

‘How-To’ Create a branch of repository on premise (or local machine)

  1. git checkout -b <New Branch Name>
  2. Example:
  3. git checkout -b Children-OnPremise-Branch_one

‘How-To’ Create a branch of repository on GitHub Cloud

  1. Click on button
  2. <img align="right" width="300" src="images/branch.png" alt="Click on button" />
  3. Type branch name in textbox and Hit Enter

‘How-To’ Merge changes from one branch to other

  1. Checkout the branch where to add the changes, then hit the merge.
  2. Checkout to branch where to add the changes:
  3. git checkout <BranchName-To-MergeIn>
  4. Merge command with path of branch to pull the changes from:
  5. git merge <Source-BranchName>
  6. git merge origin/Children-branch-one

‘How-To’ Stage the Changes

  1. Use Add command to stage the changes for next commit
  2. git add images/branch.png

‘How-To’ Commit the Changes

  1. -m <message>. This adds the message for commit
  2. git commit -m "Change Details"

‘How-To’ Stage & Commit the Changes

  1. -a Includes all changed files in commit.
  2. git commit -a -m "Change titles and styling on homepage"
  3. -amend helps to rewrite the last commit

‘How-To’ Push the Changes

  1. Ensure the expected branch is checked out(if not, Can use git checkout)
  2. To push the changes:
  3. git push <target> <source>
  4. ex: git push origin <branch-name>
  5. Once push(s) is done, one can use below one as connection is now there
  6. git push