Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, October 31, 2014

How to Import Existing GIT Project to BitBucket

Here are the steps to import your existing GIT project to BitBucket. This tutorial focuses on local GIT project. If you plan to import project from your hosting site, checkout this Atlassian article instead.

1. Login to to your BitBucket account.

2. Create a new repo.
Click Create button.
Click Create repository button to save the new repo.

3. Open your Terminal application to the project's path.
cd /path/to/my/repo

3.1. Remove any existing remote (in this case the remote name is origin). Skip this if your project has no remote yet.
git remote rm origin

4. Point your project to the new BitBucket repo.
git remote add origin https://mybitbucketusername@bitbucket.org/mybitbucketusername/myexistingproject.git

5. Push the project and all its refs.
git push -u origin --all

6. Push tags in the project.
git push -u origin --tags

Done. :)

Wednesday, June 13, 2012

Git SVN - Merge Conflict During Commit

Just encountered an error while committing in Git SVN:

Merge conflict during commit: File or directory...

Too good the solution was easy:

git svn fetch
git svn rebase
#resolve files in conflict if any
git svn dcommit

Sunday, June 10, 2012

Notes Using git svn

Git is one thing and SubVersion (SVN) is another thing. Using git while working on an svn repository is yet another thing. Now here are my notes:

Go to master branch:

git checkout master

Get remote changes:

git svn fetch

Apply remote changes to master:

git svn rebase

Create new branch named dev:

git branch dev

Go to dev branch:

git checkout dev

Update dev branch from changes in master:

git rebase master dev

Update master branch from changes in dev:

git rebase dev master

Commit to svn repository:

git svn dcommit

Tuesday, June 5, 2012

Git svn in Ubuntu

It's time to familiarize more with git after working for years with SubVersion.

As my current project uses SVN, thank God git svn exists so I can practice more using git.

For future reference, here is a link for starting using git on svn repo in Ubuntu through git svn.

http://blog.coralic.nl/2010/01/15/git-svn-and-ubuntu/