diff --git a/Git cheat sheet.md b/Git cheat sheet.md index 18f7592..e9f4a7b 100644 --- a/Git cheat sheet.md +++ b/Git cheat sheet.md @@ -13,15 +13,22 @@
git remote rm origin
git remote add origin {{URL to repo}}
git push -u origin master
-git remote -v
-
+git remote -v
-#### Pull av repository, ignorera och skriv över lokala filer
+#### Slå ihop flera repon ####
+Merge project-a into project-b:
+
+cd path/to/project-b
+git remote add project-a /path/to/project-a
+git fetch project-a --tags
+git merge --allow-unrelated-histories project-a/master # or whichever branch you want to merge
+git remote remove project-a
+
+#### Pull repository, ignorera och skriv över lokala filer
git fetch --all
git reset --hard
-git pull
-
+git pull
#### Återställ lokal arbetskatalog till utcheckad version