Gits Bits - Stuff to remember

0

Category : ,

Conflict between Develop and new feature branches

When creating a Pull Request and there is a Conflict between your branch and the Branch you're trying to merge into ie My_Branch into Develop and you get a conflict with the gitignore.
  1. Pull develop branch locally
  2. Switch back to your branch
  3. Right click on your Develop and "Merge Develop into current Branch"
  4. This will display conflicts locally, so you can fix them.
  5. Right click on conflicted file and "Resolve conflicts using External tool"
  6. Resolve conflicts
  7. Commit Merge locally.
  8. I Merged on the web aswell to complete Pull Request

Copy repo into another repo(all commits)

  1. Clone Destination repo(make a copy, don’t use your already existing one) eg reponame.Test
  2. Delete the link to the original repository to avoid accidentally making any remote changes
    git remote rm origin
  3. create new branch on destination repo
  4. Create a remote connection to sourceRepo as a branch in destRepo.
    git remote add /url/to/sourceRepo
  5. Pull from the sourceRepo branch
    git pull --allow-unrelated-histories /url/to/sourceRepo branchname-in-sourceRepo
  6. Address any conflicts and merge

my thanks to:
https://blog.mattsch.com/2015/06/19/move-directory-from-one-repository-to-another-preserving-history/
http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/

0 comments:

Post a Comment