Git export/import commits history

0 votes
we have one big git repo, which includes 3 folders for different projects:

Existing repo consists of - .net_newrepo, java_newrepo, android_newrepo

New project should contain history only about particular project. .net about .net, and not about ios and android etc.
Jul 12, 2018 in Git & GitHub by Nilesh
• 6,900 points
124 views

1 answer to this question.

0 votes

This should work

$ cd dotnet_newrepo
$ git filter-branch --subdirectory-filter dotnet_is_dir -- --all
$ cd ..
$ cd java_newrepo
$ git filter-branch --subdirectory-filter java_is_dir -- --all
$ cd ..
$ cd android_newrepo
$ git filter-branch --subdirectory-filter android_is_dir -- --all
$ cd ..
answered Jul 12, 2018 by Kalgi
• 2,620 points

edited Jul 12, 2018 by Kalgi

Related Questions In Git & GitHub

0 votes
1 answer
0 votes
1 answer

Git origin not found

For this to work, you need to ...READ MORE

answered Apr 25, 2018 in Git & GitHub by DragonLord999
• 8,380 points
82 views
0 votes
1 answer

Configure Git and GitHub

In version control with Git, we deal ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,380 points
17 views
0 votes
1 answer

Git pull vs Git Fetch

The objective of both these commands is ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,380 points
182 views
0 votes
1 answer

Git & GitHub

Even though their names sound the same, ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,380 points
15 views
+1 vote
2 answers

Git Commands

This command basically adds all your changes ...READ MORE

answered Aug 14, 2018 in Git & GitHub by Kalgi
• 37,320 points
44 views
+13 votes
2 answers
0 votes
1 answer