![]() After running the above command you are on a new branch "foo", and the first commit you create from this state will start a new history without any ancestry. orphan creates a new branch, but it starts without any commit. You can create a new empty branch like this: $ git checkout -orphan foo Normally branches share files from the directory, but in Git it is possible to create empty branches. ![]() In Git you can have it all in one repository and keep things separated and isolated in branches. If the project is a web application with a database backend perhaps a backup of the SQL code is kept in yet another repository. In many coding projects the code is kept in one repository and the documentation is kept in another. | about | faq | resources | contact | rss How to Create a New and Empty Branch in Git How to Create a New and Empty Branch in Git ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |