GitHub

Ubuntu / SSH

Configure GitHub and add a SSH key to your GitHub account:

Connecting to GitHub with SSH

Initialize GitHub folder, add files, commit and push:

Adding a file to a repository using the command line

Visual Studio

Install the extension GitHub in Visual Studio.

Add the current project to source control.

Then the repository could be published to GitHub and all git functions enabled in built-in Visual Studio GUI.

Basic GitHub Workflow

# create a new project, initialize GitHub, and publish to GitHub
$ git init
$ git add .
$ git status
$ git commit -a -m "commit"
$ git push
# Clean untracked files
$ git clean -df
# Abort uncommitted changes
$ git checkout -- .
# Create new branch
$ git branch -b branchname
$ git checkout branchname
# Delete branch
$ git checkout otherbranchname
$ git branch -d branchname

How to insert code in WordPress

GitHub Instruction

Git远程操作详解

Leave a comment

Blog at WordPress.com.

Up ↑