github - Creating a GIT project from specific commit of another GIT project -
my team has created gradel based spring git project lot of configuration. wondering if can save effort in creating new project require same configuration.
so planning checkout old commit of existing project, suppose c6. , create new project here.
a possible may be;
- checkout c6
- create new git repository.
- manually copy contents old repository , paste new repository
- change remote of new repository
- push changes of new repository
but not sure whether right approach , gonna work
please suggest me correct way achieve it.
you can clone repository , reset master c6
$ git reset --hard c6
remove unwanted branches:
$ git branch -d branch_name
there lot of dangling commits. check them with:
$ git fsck --no-reflogs
and run these commands remove dangling commits:
$ git reflog expire --expire=now --all $ git gc --prune=now
and remember delete remote origin
, or able push/pull to/from other repository (considering code base not receive same updates):
$ git remote remove origin
Comments
Post a Comment