Changes between Version 71 and Version 72 of DeveloperGuidelines/Git


Ignore:
Timestamp:
09/18/13 11:31:17 (11 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Git

    v71 v72  
    229229Under some circumstances, git will complain when you try to rename or delete a branch. If you are sure
    230230you want to do it, use -M instead of -m for rename, or -D instead of -d for delete.
     231
     232If you will be working on a specific branch for a particular event (e.g. a deployment or hackathon),
     233then you can add that branch to your local repository:
     234{{{
     235git remote add <branch_name> https://github.com/flavour/<branch_name>.git
     236git fetch <branch_name>
     237}}}
     238Now you have both the master branch from the trunk repository, and the specific branch <branch_name>.
     239
     240You can push branches other than master to your !GitHub repository.
     241{{{
     242git push -u origin <branch_name>
     243}}}
     244Note it is good to specify the branch name to push, else git will try to push all of them.
     245The -u tells git to make your local branch "track" the remote branch. This is only needed on
     246the first push to that branch.
     247
     248If you need a specific revision of the current branch, your can check out that revision on a new branch:
     249{{{
     250git checkout -b <revision> <branch_name>
     251}}}
     252(git requires a name for a branch if you want to preserve commits.)
    231253=== Creating a second working directory and repository ===
    232254If you wish to have multiple directories containing different branches, you can run these as separate web2py applications.