Changes between Version 2 and Version 3 of remote/git


Ignore:
Timestamp:
Mar 17, 2015 1:33:00 PM (7 years ago)
Author:
vegasm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • remote/git

    v2 v3  
    1717}}}
    1818
     19{{{
     20=================================
     21git branch -r #show remote branches
     22git branch #show local branches
     23git branch -v #show local branches and the last commit
     24git fetch origin #Fetch a branch
     25git branch -v -a #Check available branches for checkout
     26git checkout -b my_new_branch #Verify previously the branch you are
     27git checkout -b my_local_new_branch_name origin/branch_name #Check out the branch you are interested in
     28=================================
     29Eliminar detached head: Detached HEAD state means that you are on unammed branch. HEAD points directly to commit and is not symbolic
     30 reference to some local branch
    1931
     32git reset --hard
     33
     34=================================
     35Actualizar fork branch
     36 
     37First add the upstream project as a Git remote:
     38
     39git remote add upstream https://github.com/upstream-username/projectname.git
     40Then pull (meaning fetch and then merge automatically) the changes from the remote's master branch into your local repository's current (master) branch:
     41
     42git pull upstream master #master means the name of the branch (4.5.6, 4.6.0..)
     43Now your local repository is in sync with upstream. Finally, push your local repo to your Github fork:
     44
     45git push origin maste
     46}}}
     47
     48https://superuser.com/questions/456145/how-can-i-resync-a-fork-from-original/456189#456189?newreg=301978e6c06a41a680396c82fc589f3c
    2049http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit