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
- Click Repositories > Create repository or the Create new repository link.
- Choose a repository Owner.
This only appears if you are creating under an account with membership in one or more teams. - Enter a Name and Description for your repository.
- Tick Private if you want to hide your repository from the general public, so that only selected people can see it.
- Select the Repository type.
- Click Create repository.
- In local computer, create directory that will be used to store repository and go into the directory
- Add a "remote origin repository" (i.e. correspond to the one in BitBucket) using follow command : git remote add orign <bitbucket Path Name> .
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>