Using Branch in Git

Categories: Development Notes; Tagged with: ; @ May 4th, 2014 10:29

List branch names

git branch

View Branches

git show-branch

Create new branch

git branch liguoliang-com

GDEV SimpleWordPressTheme # git show-branch
! [liguoliang-com] changed version
* [master] changed version

+* [liguoliang-com] changed version

Switch Branch

GDEV SimpleWordPressTheme # git checkout liguoliang-com

GDEV SimpleWordPressTheme # git status
# On branch liguoliang-com

Push new branch to Remote Server. e.g. Github:

GDEV SimpleWordPressTheme # git push origin liguoliang-com

<<Version Control with Git>> Notes: Git Basic Object Types

Categories: Development Notes; Tagged with: ; @ May 1st, 2014 19:11

Good book for Git: http://shop.oreilly.com/product/0636920022862.do

Powerful tools and techniques for collaborative software development

 

The Birth of Git

Prior to Git, the Linux Kernel was developed using commercial BitKeeper VCS,  however, in 2005, “The commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool” — http://git-scm.com/book/en/Getting-Started-A-Short-History-of-Git

(more…)

Bitbucket: Free Git Private Repository 免费私有Git空间

Categories: Development Notes; Tagged with: ; @ March 31st, 2013 11:48

About Bitbucket

Host your code online in as many public and private repositories as you want. Free for 5 users.

Give your code a home on the web. Share what you’re working on with your colleagues, collaborators, or potential employers.

All 5 user accounts are FREE.

image

Checkout: https://bitbucket.org/

Git新手入门

Categories: Development Notes; Tagged with: ; @ December 11th, 2012 0:27

1. 创建Repository

git init

2. Commit文件

git add .
git commit –m “init Import”

3. 查看状态

git status

4.增加本地Repo到服务器

git remote add origin https://github.com/.....git

5Commit 到服务器

git push origin master

6. 从gitHub复制Repository

git clone git://…git

7. 从服务器更新:

git pull origin master

当一个Repo在GitHub上创建完毕后会有简要提示:

Create a new repository on the command line

touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/DavidGuoliang/DoubanAnalytics.git git push -u origin master

Push an existing repository from the command line

git remote add origin https://github.com/DavidGuoliang/DoubanAnalytics.git git push -u origin master

GitHub有提供Windows下的UI图形界面.

Links: http://gitref.org/creating/



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.