Changes between Version 10 and Version 11 of u/erica/GitRepos
- Timestamp:
- 05/13/15 12:52:29 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/GitRepos
v10 v11 40 40 This will take the current version of the development code and create an offshoot of it (i.e. a copy of it) for you to then work with. 41 41 42 As you make changes to this branch, note they will all be local to your working directory until you push those changes into the central repo. This means that if you were to delete your directory, your branch (and all of its changes) would cease to exist (i.e. no copy of it is present in the central repo until you push). 43 44 When you are ready to push these changes to the repo, you would give the command, 42 This new branch is only a local copy, meaning that if you were to delete your directory, your branch (and all of its changes) would cease to exist (i.e. no copy of it is present in the central repo until you push), and that no one else can see it. Instead, you want to push (i.e. copy into) this branch into the central repo, 45 43 46 44 {{{ 47 git push 45 git push -u origin your_new_branch 48 46 }}} 49 47 50 This pushes (i.e. copies) your current working branch into the central repo. So if you are working on *your_new_branch, then it will push a copy of your_new_branch into the repo. This means that other people would see your code if they download a clean version of the repo, or update theirs with a,48 Now others would see your branch if they downloaded a clean version of the repo, or updated theirs with, 51 49 52 50 {{{ … … 54 52 git branch -a 55 53 }}} 54 55 Note, as you go on to make changes to this branch, note they will be local until you add, commit, and then push those changes back into the central repo. (cf. [https://astrobear.pas.rochester.edu/trac/wiki/DevelopmentProcedure here] for details). 56 56 57 57 Now, the procedure for pushing changes into the development branch goes as follows. Once your changes are ready to go into the dev branch, you want to switch back to the development branch and update it so that your changes are going to be merged with the ''newest'' version of the dev branch. You do this with, … … 74 74 }}} 75 75 76 *Note here, I think you can only 'copy' things back into the central repo that have been 'checked in'.77 76 78 This will push whatever branch you are on back into the central repo (so for this example, that is the development branch). 77 ? What about your pushing your ticket branch back into the central repo after it has been merged? Or does command, git push, push *all* of your local repos back into the main repo? 78 79 ?I think you can only push changes back into the central repo that have been 'checked in', right? 79 80 80 81 Once you are done with your edits, you can delete your local copies of the repos with,