@herminia_bruen
To create a full orphan copy of a current branch in git, you can follow these steps:
- Check out the branch that you want to create an orphan copy of:
1
|
git checkout <branch-name>
|
- Create a new orphan branch based on the current branch:
1
|
git checkout --orphan <new-branch-name>
|
- Remove all files from the working directory and the index:
- Add and commit any new files that you want to include in the orphan branch:
1
2
|
git add .
git commit -m "Initial commit on orphan branch"
|
- Push the orphan branch to the remote repository (if necessary):
1
|
git push origin <new-branch-name>
|
Now you have successfully created a full orphan copy of the current branch in git.