Git command line

# Pull the repo from master

git pull

# Create branch for myself in local

git branch john/jenkins_code

# switch to myself branch of local

git checkout john/jenkins_code


# New file to wanted path and add the file to git branch

git add jenkins

# Get branch status

git status

# Commit changes to local branch ,, format git commit -a -m "<package name>: fix [bug number], comments for the changes"

git commit -a -m "intial file"


# Get log info

git log


# Get changes by changed id (changed id can be got from git log)

git show 00deef2edc1e03781bb2a578b81ce27ade46dfd

# Push local branch to origin

git push origin john/jenkins_code

 

posted on 2015-04-10 15:10  Newbie wang  阅读(291)  评论(0编辑  收藏  举报