1

I am dealing with a project which was moved to GitHub repo with some major updates in the project base. But those who work on same project base has only the non updated version. So how to convert their local non-git repo to local git repo and update them with new version of the same project.

I have gone through all documentation of git and still I am not clear

2
  • What versioning system are you using for the non-git repository? Commented Jan 24, 2013 at 6:43
  • No we did not have versioning yet, but now we trying to start versioning using GitHub. Commented Jan 24, 2013 at 8:11

2 Answers 2

1

To keep their work, the best way would be:

# current dir is ~/oldversion # create a new directory mkdir ~/newversion # get the clean versioned project git clone [email protected]:Your/repo . # create a new local branch and go on it git checkout -b migration # now copy everything from the old project. the modified files will appear with "git status" cp -r ../oldversion/* ./ # commit the last work git commit --all -m "importing to git" # now, make some checks/editio, git diff, git rm, git revert, git checkout path/to/file whatever ... # then import your work in a branch for everyone, if you use master that means git checkout master git merge migration --no-ff -m "migrated by me" 

If a scm was used, you may prefer to exclude some files at one point, like the .svn directories.

Sign up to request clarification or add additional context in comments.

Comments

0

One way would be to:

6 Comments

But the project drive size is 24GB and so git add . says fatal: confused by unstable object source data for 5ff6461b50272925aa5481de381f9797bb2784bf
@SathishKumar does the GitHub project have also 24GB of data? If not, that means you need to define in a.gitignore file what you don't want to version, and add only the sources.
It is of 300MB size, since it is a base and not the whole project.
@SathishKumarkk but surely you don't have 24GB of sources? Git is a source control only.
@SathishKumarkk ok, anyway you need to carefully write your .gitignore file in order to version only what you need (and not what could be generated)
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.