Malemna
Malemna

Reputation: 95

Changing file structure when using git

is there any way in which i can change the file structure on visual studio code whenever i create a new branch?

I recently created a new local repository and cloned form my remote repository

Now when i want to create a new branch, the file structure just remains the same. How can i set it so that the file structure is the same for the local main branch and produce a copy of the local files for the feature1 local branch that i make?

Is such a function possible with git? Thanks

enter image description here

Upvotes: 0

Views: 195

Answers (1)

Karthik Nayak
Karthik Nayak

Reputation: 740

So I think I understand what you're trying to do. You want to retain your files while you checkout a new branch.

I think you're confused about how exactly git works. So basically the local copy that you want to do, is intrinsically handled by git. You don't need to worry about it. When you create a new branch and you make commits there, they only exist in that branch in some sense. You can always go back to your old branch and git will automatically revert the changes to ensure your files were as before.

Does that make sense?

Upvotes: 1

Related Questions