Debian Wheezy Local Git Server With Git Lite Workflow - Page 3
Public release on masterOn branch next, update Changes file and any other files that contains a reference to the version number. If Alice does not intend to bring this particular change to a full release she adds the change text, but leaves a template identifier like [% nextrev %] or {{NEXT}} as a placeholder for the revisions number. When she decides to release a new version, she first updates branch next with the current authorized code from branch depot/next: $ git pull Project files may also contain revision information. Edit these: < edit any project files that contains any revision number > Finally, edit the file Changes and the template identifiers with the actual version information for this release: $ nano Changes Run the unit test suit after any edits and then commit the code. These unit tests are frequently run as a form of regression test in branch next. $ git add --all Before merging with master, tag it with the new version number: $ git tag -a v0.0.2 -m 'version 0.0.2' View (v) the history (hi): $ git vhi * b437a9c - (HEAD, v0.0.2, next)version 0.0.2(52 seconds ago) <alice> Alice switch (sw) to (2) branch master for the public Github release: $ git sw2 master View (v) the history (hi): $ git vhi * 384b71b - (HEAD, origin/master, depot/next, master)Initial commit(80 minutes ago) <alice> Note that master branch only knows about the initial commit. Merge branch next with a fast forward (always) into branch master. The fast forward updates the branch pointer, without creating a merge commit: $ git mef next Updating 384b71b..b437a9c View (v) the history (hi): $ git vhi * b437a9c - (HEAD, v0.0.2, next, master)version 0.0.2(11 minutes ago) <alice> Now HEAD, next and master have been aligned with the git merge alias git mef. Push the new version to the public repository origin/master at Github: $ git push Counting objects: 17, done. Note that that branch depot/next is not updated with these recent changes.
Update branch depot/next and dispose the topic branchSwitch (sw) to (2) branch next again. $ git sw2 next Switched to branch 'next' Branch depot/next is still at the original commit as seen with: $ git vhi * b437a9c - (HEAD, v0.0.2, origin/master, next, master)version 0.0.2(16 minutes ago) <alice> Update branch depot/next with a push: $ git push Any other team developer can now pull down recent updates from depot/next to their local desktop before branching off in a new topic branch. Dispose the milkshake branch with: $ git branch -d milkshake Deleted branch milkshake (was c9e0441).
Add developer Bill to My-Module project.Install git and gitk (revision tree visualizer) at Bills machine with: # aptitude install git Bill is ready to work on the project, when his public ssh key (~/id_rsa.pub) has been added to the git1 user on the depot server (see first page). Set up git user information: $ git config --global user.name "Bill" Add the git aliases (see first page) and set up the local project directory: $ mkdir ~/projects Clone the project repository from the remote origin which were named depot and the branch named depot/next: $ git clone -o depot -b next git1@192.168.0.100:/srv/git1/My-Module.git Confirm that the repository was cloned: $ cd My-Module -rw-r--r-- 1 bill bill 429 Dec 14 11:14 Build.PL Now Bill is ready to work on the new project. Git push and pull configuration for his repository was automatically setup by git since the project was cloned from the server. View (v) the remote (re) configuration information: $ git vre depot git1@192.168.0.100:/srv/git1/My-Module.git (fetch)
Bill commits new code.Bill pulls down the latest code from branch depot/next before his topic branch is created. Note that a pull is a fetch from depot/next followed by a merge in Bills local next branch. $ git pull He decides to modify the build file Build.PL. His plan is to replace the artistic2 license with Perls. Create a topic branch for this: $ git nbr build-license Open the file Build.PL with an editor: $ nano Build.PL Add and commit changes: $ git add --all Switch (sw) to (2) branch next and merge in his new code: $ git sw2 next Update the Changes file but leave out the version number since this have to wait for some future point in time when to release. Edit Changes file: $ nano Changes Run the unit test suit again after all edits then commit the new code. $ git add --all Finally, update the remote branch depot/next: $ git push After this Bill can continue to create new topic branches. In the case depot/next development have progressed by other team members, Bills push fails with: $ git push To git1@192.168.0.100:/srv/git1/My-Module.git This means that Bill must pull from branch depot/next and resolve any conflicts by editing the file and committing again. After this he can push his changes: $ git pull
|



Recent comments
1 day 10 hours ago
1 day 13 hours ago
2 days 1 hour ago
2 days 3 hours ago
2 days 8 hours ago
2 days 14 hours ago
2 days 23 hours ago
3 days 1 hour ago
3 days 9 hours ago
3 days 11 hours ago