The Git/GitHub Questions, Answers and Howto Thread
Moderator: Committer
Re: The Git/GitHub Questions, Answers and Howto Thread
Hi all.
I don't understand how to do a pull request. I have a branch in a repository, but it doesn't appear in github's menu. (It's to change the layout of the mainpanel in ui/designwnd.cpp).
I don't understand how to do a pull request. I have a branch in a repository, but it doesn't appear in github's menu. (It's to change the layout of the mainpanel in ui/designwnd.cpp).
- The Silent One
- Graphics
- Posts: 1129
- Joined: Tue Jul 01, 2003 8:27 pm
Re: The Git/GitHub Questions, Answers and Howto Thread
Not an expert, but: if I go to your github profile, I don't see a repository there. Have you pushed your local repository to upstream?
Which git client do you use, if any?
Which git client do you use, if any?
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.
Re: The Git/GitHub Questions, Answers and Howto Thread
I use the basic command line git in Linux. I just tried 'git push --set-upstream origin design-mainwindow-layout'. It said 'remote: Permission to freeorion/freeorion.git denied to rafafelp.'
(Btw the name should mainpanel not mainwindow).
(Btw the name should mainpanel not mainwindow).
Re: The Git/GitHub Questions, Answers and Howto Thread
Did you fork original FreeOrion repository on github?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: The Git/GitHub Questions, Answers and Howto Thread
You also need to push "Fork" button on GitHub FreeOrion page to have a repository where you have a right to push.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: The Git/GitHub Questions, Answers and Howto Thread
Ok, it's done. Thanks.
Re: The Git/GitHub Questions, Answers and Howto Thread
I have a branch KISSHardTarget with the changes from Ophiuchus and some from mine (some corrections that I was lazy to fetch/pull from Ophi's branch and did on my own), which I've been playing with.
Now I want to try some saves from other people. I did:
Here I thought "that must be one of my manual changes, not important since they are also in Ophi's branch, so I will get rid of them", and I looked up how to do that and found a way:
Now I'm really lost.
I have not made any changes in my local master.
Is this telling me that my local master has now all changes from KISSHardTarget that I didn't stash?
Edit: In the end I did a commit all to a new branch and a hard reset to upstream/master. Seems OK.
Now I want to try some saves from other people. I did:
Code: Select all
freeorion$ git checkout
M default/scripting/ship_parts/FighterBay/FT_BAY_1.focs.txt
M default/scripting/ship_parts/FighterHangar/FT_HANGAR_1.focs.txt
M default/scripting/ship_parts/FighterHangar/FT_HANGAR_2.focs.txt
M default/scripting/ship_parts/FighterHangar/FT_HANGAR_3.focs.txt
M default/scripting/ship_parts/ShortRange/SR_SPINAL_ANTIMATTER.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_1_1.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_2_1.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_3_1.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_4_1.focs.txt
M default/scripting/techs/ship_weapons/fighters/SHP_FIGHTERS_2.focs.txt
M default/scripting/techs/ship_weapons/fighters/SHP_FIGHTERS_3.focs.txt
M default/scripting/techs/ship_weapons/fighters/SHP_FIGHTERS_4.focs.txt
M default/stringtables/en.txt
freeorion$ git fetch upstream
remote: Enumerating objects: 1678, done.
remote: Counting objects: 100% (1678/1678), done.
remote: Compressing objects: 100% (182/182), done.
remote: Total 2337 (delta 1512), reused 1656 (delta 1496), pack-reused 659
Receiving objects: 100% (2337/2337), 924.98 KiB | 397.00 KiB/s, done.
Resolving deltas: 100% (1868/1868), completed with 280 local objects.
From https://github.com/freeorion/freeorion
* [new branch] AppVeyor_MSVC_Configs_Build_test -> upstream/AppVeyor_MSVC_Configs_Build_test
+ 540aaa2...0b214ec Government -> upstream/Government (forced update)
* [new branch] Government2 -> upstream/Government2
b9842c4..3eb7770 master -> upstream/master
cb8e1a3..911179b weekly-test-builds -> upstream/weekly-test-builds
* [new tag] v0.4.9-rc1 -> v0.4.9-rc1
* [new tag] v0.4.9-rc2 -> v0.4.9-rc2
* [new tag] v0.4.9-rc3 -> v0.4.9-rc3
* [new tag] with-FreeOrionSDK-v11 -> with-FreeOrionSDK-v11
freeorion$ git branch -l
CombatSystem_CacheTargets
Government
* KISSHardTarget
MissilesBackend
master
release-v0.4.8
release-v0.4.9
warbots
freeorion$ git checkout master
error: Your local changes to the following files would be overwritten by checkout:
default/stringtables/en.txt
Please, commit your changes or stash them before you can switch branches.
Aborting
Code: Select all
freeorion$ git checkout -- default/stringtables/en.txt
freeorion$ git checkout master
M default/scripting/ship_parts/FighterBay/FT_BAY_1.focs.txt
M default/scripting/ship_parts/FighterHangar/FT_HANGAR_1.focs.txt
M default/scripting/ship_parts/FighterHangar/FT_HANGAR_2.focs.txt
M default/scripting/ship_parts/FighterHangar/FT_HANGAR_3.focs.txt
M default/scripting/ship_parts/ShortRange/SR_SPINAL_ANTIMATTER.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_1_1.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_2_1.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_3_1.focs.txt
M default/scripting/ship_parts/ShortRange/SR_WEAPON_4_1.focs.txt
M default/scripting/techs/ship_weapons/fighters/SHP_FIGHTERS_2.focs.txt
M default/scripting/techs/ship_weapons/fighters/SHP_FIGHTERS_3.focs.txt
M default/scripting/techs/ship_weapons/fighters/SHP_FIGHTERS_4.focs.txt
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 15 commits.
(use "git push" to publish your local commits)
freeorion$ git pull upstream master
error: Cannot pull with rebase: You have unstaged changes.
I have not made any changes in my local master.
Is this telling me that my local master has now all changes from KISSHardTarget that I didn't stash?
Edit: In the end I did a commit all to a new branch and a hard reset to upstream/master. Seems OK.
Re: The Git/GitHub Questions, Answers and Howto Thread
That only changed the single file (en.txt) to the current HEAD version of your workspace. So all the other modified files (M) were not affected by this.Oberlus wrote: ↑Fri Mar 20, 2020 7:14 amCode: Select all
freeorion$ git checkout -- default/stringtables/en.txt
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: The Git/GitHub Questions, Answers and Howto Thread
So the problem was that I had not committed the changes in KISSHardTarget branch? I still don't understand shit.
Now I have other problems after fetching master:
- I'm in a detachef head state.
- Checkout master and doing cmake throws me error about minimum python should be 3.5 while I have 2.7.12.
- Checkout v0.4.9 and cmake works but trying to compile throws me internal compiler errors of segmentation fault at GG/src/dialogs/ColorDlg.cpp:1:0 (a comment line) and at parse/ArithmeticRules.cpp:1:0 (an include clause).
This is Ubuntu 16.04.
Re: The Git/GitHub Questions, Answers and Howto Thread
Well, there is the python migration ongoing - this will be the next release feature. I am not sure if python2 is supported anymore. Install yourself python 3.5 with "apt install python3" - xenial has python 3.5.1 available.Oberlus wrote: ↑Sun Mar 22, 2020 12:06 pmSo the problem was that I had not committed the changes in KISSHardTarget branch? I still don't understand shit.
Now I have other problems after fetching master:
- I'm in a detachef head state.
- Checkout master and doing cmake throws me error about minimum python should be 3.5 while I have 2.7.12.
- Checkout v0.4.9 and cmake works but trying to compile throws me internal compiler errors of segmentation fault at GG/src/dialogs/ColorDlg.cpp:1:0 (a comment line) and at parse/ArithmeticRules.cpp:1:0 (an include clause).
This is Ubuntu 16.04.
Not sure about the compiler prob, but this is most likely not a git issue. To make sure - what is the output of "git status" ?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: The Git/GitHub Questions, Answers and Howto Thread
Python 3.5 was already installed, so I don't know what else to do:
Code: Select all
~$ sudo apt-get install python3.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.5 is already the newest version (3.5.2-2ubuntu0~16.04.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Not sure about the compiler prob, but this is most likely not a git issue. To make sure - what is the output of "git status" ?
Code: Select all
~/Projects/FreeOrion/freeorion$ git status
HEAD detached at v0.4.9
nothing to commit, working directory clean
Re: The Git/GitHub Questions, Answers and Howto Thread
Ubuntu 16.04 doesn't have boost-python3 available.Ophiuchus wrote: ↑Sun Mar 22, 2020 12:54 pmWell, there is the python migration ongoing - this will be the next release feature. I am not sure if python2 is supported anymore. Install yourself python 3.5 with "apt install python3" - xenial has python 3.5.1 available.
Not sure about the compiler prob, but this is most likely not a git issue. To make sure - what is the output of "git status" ?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: The Git/GitHub Questions, Answers and Howto Thread
Does this mean I should upgrade to 18.04 for FO 0.4.10?o01eg wrote: ↑Sun Mar 22, 2020 4:10 pmUbuntu 16.04 doesn't have boost-python3 available.Ophiuchus wrote: ↑Sun Mar 22, 2020 12:54 pmWell, there is the python migration ongoing - this will be the next release feature. I am not sure if python2 is supported anymore. Install yourself python 3.5 with "apt install python3" - xenial has python 3.5.1 available.
Not sure about the compiler prob, but this is most likely not a git issue. To make sure - what is the output of "git status" ?
Re: The Git/GitHub Questions, Answers and Howto Thread
YepOberlus wrote: ↑Sun Mar 22, 2020 8:17 pmDoes this mean I should upgrade to 18.04 for FO 0.4.10?o01eg wrote: ↑Sun Mar 22, 2020 4:10 pmUbuntu 16.04 doesn't have boost-python3 available.Ophiuchus wrote: ↑Sun Mar 22, 2020 12:54 pm
Well, there is the python migration ongoing - this will be the next release feature. I am not sure if python2 is supported anymore. Install yourself python 3.5 with "apt install python3" - xenial has python 3.5.1 available.
Not sure about the compiler prob, but this is most likely not a git issue. To make sure - what is the output of "git status" ?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm