Did anyone ever find an easy way to port commits from one codebase to another?
Say from a tg codebase to a baycode codebase, or vice versa?
Porting code features
- Xerux
- Joined: Fri Apr 18, 2014 5:26 am
- Byond Username: Xerux
Re: Porting code features
You can add the other code-base's repo as a remote and cherry-pick commits from it.
Spoiler:
- oranges
- Code Maintainer
- Joined: Tue Apr 15, 2014 9:16 pm
- Byond Username: Optimumtact
- Github Username: optimumtact
- Location: #CHATSHITGETBANGED
Re: Porting code features
Indeed - from the command line
git remote add baystation https://github.com/Baystation12/Baystation12.git
git fetch baystation
git log baystation - to view commits
once you find the commits you like
git cherry-pick commithash
git remote add baystation https://github.com/Baystation12/Baystation12.git
git fetch baystation
git log baystation - to view commits
once you find the commits you like
git cherry-pick commithash
Re: Porting code features
Great, now is there a way to search the log based on pull requests, so I can for example bring up my own PRs that have been merged?
- oranges
- Code Maintainer
- Joined: Tue Apr 15, 2014 9:16 pm
- Byond Username: Optimumtact
- Github Username: optimumtact
- Location: #CHATSHITGETBANGED
Re: Porting code features
Unfortunately not, but you can do it from github
https://github.com/Baystation12/Baystation12/pulls/
Here and then use the filter to search
is:pr is:closed author:xxxxx
You can then view each commit and take note of the relevant commit hashes
Do bear in mind that git cannot always cleanly apply commits, it will do it's best and then stop and let you resolve the final differences if it encounters anyway (which is always likely between codebases)
https://github.com/Baystation12/Baystation12/pulls/
Here and then use the filter to search
is:pr is:closed author:xxxxx
You can then view each commit and take note of the relevant commit hashes
Do bear in mind that git cannot always cleanly apply commits, it will do it's best and then stop and let you resolve the final differences if it encounters anyway (which is always likely between codebases)
- oranges
- Code Maintainer
- Joined: Tue Apr 15, 2014 9:16 pm
- Byond Username: Optimumtact
- Github Username: optimumtact
- Location: #CHATSHITGETBANGED
Re: Porting code features
Also git comes bundled with a small gui tool called gitk
just run gitk from the cli in your repo
It has some limited ability to search the commit log for words of relevance so that may also assist in tracking down changed code.
just run gitk from the cli in your repo
It has some limited ability to search the commit log for words of relevance so that may also assist in tracking down changed code.
Who is online
Users browsing this forum: No registered users