Posts

Showing posts with the label git tutorials

Merge Two Git Repositories

Here is the step to merge two git repositories: Let's say you have a project name X and another project name Y with same codebase but some different commit ahead/ behind of project X. So you want to merge all the code from project-Y to project-X. Let's assume you are already in the project-X. git remote add project-Y path/to/project-Y  git fetch project-Y --tags git merge --allow-unrelated-histories project-Y/master  (note: Mention the branch name you want to merged with) git remote remove project-Y Thank you

How to remove all the files and folders from github repository?

To Delete all elements in the repository, use the following command $ git rm -r * then: $ git commit -m 'Delete all the stuff from repository'