BITBUCKET新手筆記

GIT  - source code management

BITBUCKET - using GIT distributive version control system


Terminology in GIT

Repository-知識庫, to be simplified, is a compilation of source code, source code changes, issues log etc.

remotes - A distributive concept. Remote repositories are different version of the same project that exist not in local machine but in internet, server or some other computer.

clone - "exact copy of something". In Git is a command that allow you to  "clone" the whole repository to a new directory. 

fetch - retrieve changes from the remote

pull(fetch & merge) - merge changes from the remote to the local copy

Fork - Create a copy of repository for a startup of a new project.

Branch - Create a pointer that point at  a certian "point" in the development of repository. Further checkin using the branch will move the pointer from the master point of repository  https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

Commit - Record changes to repository (Only in local!!!)

Push - Transfer latest changes to network server

Origin original remote repository, by convention it is the 'primary' centralized repository as well. 

http://stackoverflow.com/questions/9529497/what-is-origin-in-git

Clone vs Fork

http://stackoverflow.com/questions/6286571/git-fork-is-git-clone


Start a new Repository on BitBucket

  1. Click Repositories > Create repository or the Create new repository link.
  2. Choose a repository Owner. 
    This only appears if you are creating under an account with membership in one or more teams. 
  3. Enter a Name and Description for your repository.
  4. Tick Private if you want to hide your repository from the general public, so that only selected people can see it.
  5. Select the Repository type.
  6. Click Create repository.
Create local repository that correspond to Repository on BitBucket(Command Based)

  1. In local computer, create directory that will be used to store repository and go into the directory
  2. Add a "remote origin repository" (i.e. correspond to the one in BitBucket) using follow command : git remote add orign <bitbucket Path Name> .
https://confluence.atlassian.com/display/BITBUCKET/Create+a+repository


Check some code the Repository on BitBucket(Command Based)

git push -u origin --all 

Get code from the Repository on BitBucket(Command Based)

git clone <username@address>








评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值