/
Git commands to sync repo
Git commands to sync repo
To Add the old repo as a remote repository:
git remote add oldrepo https://github.com/path/to/oldrepo
2. To Get the old repo commits
git remote update
3. To examine the whole tree
git log --all --oneline --graph --decorate
4. To copy (cherry-pick) the commits from the old repo into your new local one
git cherry-pick sha-of-commit-one
git cherry-pick sha-of-commit-two
git cherry-pick sha-of-commit-three
5. check your local repo is correct
git log
6. send your new tree (repo state) to github
git push origin master
7. remove the now-unneeded reference to oldrepo
git remote remove oldrepo
Video reference:
Related content
Git Repository Splitting
Git Repository Splitting
More like this
GIT Basics
GIT Basics
More like this
How-to articles
How-to articles
Read with this
Git Repository Setup
Git Repository Setup
More like this
Merging Kubernetes kubectl config files
Merging Kubernetes kubectl config files
Read with this
New Git Strategy
New Git Strategy
More like this