Once you have the local copy, you can make changes as you wish (by pulling and pushing them to a local machine). It can be a little subtle first time you do it, so keep making sure you look at whose repository a code base is listed under - either the original owner or 'forked from' and you, e.g. When you 'fork', i.e click on -, say on github, you create a copy of the code in your github account. So local and remote are actually quite distinct. Github (a remote) is a remote source that you normally push and pull those committed changes to if you have (or are added to) such a repository. So with a branch you are managing the branch, whereas with a fork someone else controls accepting the code back in. Some shops and individuals do all work, whether its a feature, bug fix or chore, in separate branches, with a separate process and/or designated person to merge these branches into master. Gist it gitx upgrade#One example of this might be if you are working on an upgrade to a new version. When you've finished you merge the branch back in to the master repository. This is when you want to preserve the main code, make a copy (branch) and then work within that branch. Gist it gitx manual#The only time you need to do a manual change is if two changes involve the same line(s) of code. It actually does an amazing job of merging file change (within the same file!) together during pulls or fetches. Git doesn't 'lock' files and require exclusive lock for an edit (older systems like pvcs come to mind). It's different from svn in that respect and you can go to any individual version without 'recreating' it through delta changes. Git stores each change to a file by saving the entire file. It also support off-line work much better as you can commit while offline and then sync and pull/push when next online. This encourages more frequent commit and work being done in smaller chunks. With git you commit to your local repository first and then push those changes to the remote. Git differs from more traditional CVS (Code Versioning Systems) like SVN (Subversion) or CVS which do have branches, but no 'local and remote' concept (your commits are directly to the remote). Git is a DVCS ( Distributed Version Control sytem) that enables you to save copies ('versions') of files frequently with the ability to merge work done by more than 1 person and you also have the ability to work offline. Git (locally) has a directory (.git/) at the project root to which you commit your files. Git is a DVCS ( Distributed Version Control system)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |