![]() ![]() published branches: an unpublished branch is a branch that only exists on your local workstation, in your local repository. For more information see Pro Git's chapter on "Working with remotes" This is defined when you execute the initial git clone command. Origin: the default remote repository (at GitHub) that all your branches are pull'ed from and push'ed to. For more information, see Pro-Git's chapter on "Basic Branching & Merging" ![]() Both branching and merging are much easier in Git, and should become a part of your daily development practices. a new branch for each feature/ticket you are working on), and once that work is completed, merge it back into the master branch. Instead, you should look to create new branches frequently (e.g. However, it is usually recommended that you not do your work directly in the master branch. Branches are generally created off of master. ![]() Master: this is the main code branch, equivalent to trunk in Subversion. The pull command executes git fetch, which retrieves the actual changes followed by git merge, putting the changes in your codebase. Use this command when you want to make sure your local branch is all caught up with changes push'ed to the remote branch. Git pull is the command that brings your current local branch up-to-date with the state of the remote branch on github. Nothing you do locally will have any affect outside your workstation until you push your changes. Git push is the command that changes the state of the remote code branch. Your work becomes part of the history of the public "DS-123" branch on github. This command pushes the current state of your local repository, including all commits, up to github ("origin" repository). In the below example, we've called this directory "dspace-src", but you can call it whatever you want. ), but this source code directory also is a valid local git repository. This is how you download a copy of the DSpace Source Code (i.e. ![]() Get a copy of the central storage facility (the repository). Git allows a developer to copy a remote subversion repository to a local instance on their workstation, do all their work and commits in that local repository, then push the state of that repository back to a central facility ( github).īearing in mind that you will always being doing your work and commits locally, a typical session looks like this: ( Borrowed from Fedora's Git Guidelines and Best Practices)
0 Comments
Leave a Reply. |