working with GIT
RETRIEVING COPY FROM SVN
note: the url specified should be a level below the trunk directory
git svn init <repository url> --stdlayout --no-minimize-url
note: specify a revision number where all branches have committed
git svn fetch -r<revision number>:HEAD
example:
branch1 latest commit is revision 2370
branch2 latest commit is revision 2389
trunk latest commit is 2390
-to retrieve copies for all branches
git svn fetch -r2370:HEAD
-unless you only need the trunk and branch2
git svn fetch -r2389:HEAD
AFTER RETRIEVING COPY FROM REMOTE VERSIONING SYSTEM(GIT/SVN)
-list your local branches, initially you should only get ‘master’ which is the the local of trunk
git branch
-list your remote branches
git branch -r
-perform branching, one from listed remote branches
git checkout <remote branch>
-specify branch to be placed to your development environment, this will be the local branch, a copy of the remote branch you specified
git checkout -b <new local branch name>
-switch among trunk and branches
git checkout <local branch name>
notes:
if your trunk and branches still have the same structure, it can be used as a single workspace of your IDE
however if a restructuring has been made in your trunk, i suggest set-up a new work space for it in your IDE.
MY USUAL WAY OF COMMITTING LOCALLY
-check files for commit
git status
-check changes made
git diff
-given that everything is okay and everything is for staging
git add .
-do commit
git commit -m <comment>
-check index
gitk
MY USUAL WAY OF COMMITTING REMOTELY IN SVN
-update my local files
git svn fetch
-check conflicts and merge
git svn rebase
-given that there are no conflicts
git svn dcommit
FIND COMMIT VERSION
git log
UNDO WHAT HAS BEEN COMMITTED TO REMOTE REPOSITORY
git revert <commit version>
THANKS to clim!
- BROWSE / IN TIMELINE
- « … creating thread …
- BROWSE / IN Uncategorized
- « Firebug for your browser.
SPEAK / ADD YOUR COMMENT
Comments are moderated.
You must be logged in to post a comment.

