FreeOrion

Forums for the FreeOrion project
It is currently Wed Dec 13, 2017 5:16 am

All times are UTC




Post new topic Reply to topic  [ 188 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12, 13  Next
Author Message
PostPosted: Wed Jul 22, 2015 9:49 am 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
Dilvish wrote:
@adrian_broher -- the one area where I at least nominally differ from your process is the step that (to the best of my recollection) was something like "hard reset master to feature". I generally just cherry pick the commits from feature to master, which is just a couple clicks and a few seconds in SmartGit. There is also one of its rebasing functions that could be used in this situation, but I never use that one. It seems to me like the end result is likely to be the same (at least in this situation that we're discussing) as your hard reset step, but am I overlooking something?


Context: viewtopic.php?p=76662#p76662

From the explanation the output is probably the same. The difference is the number of steps involved. As you already said:

Quote:
which is just a couple clicks and a few seconds in SmartGit


and a hard reset is just one command for me instead of retyping multiple commands or writing a more complex bash loop.

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
PostPosted: Sun Dec 20, 2015 11:47 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
For some reason, git has moved a bunch of commits from a branch to master when I pushed after attempting to rebase the branch on master, and this is all now on github. I committed and pushed a cleanup patch that, as far as I know, undoes the changes, but if someone who knows what they're doing wants to reset things (to this commit) to remove those extra commits from the history, perhaps that should be done?


Top
 Profile  
 
PostPosted: Sun Dec 20, 2015 5:43 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4288
Location: Sol III
Geoff the Medio wrote:
if someone who knows what they're doing wants to reset things (to this commit) to remove those extra commits from the history, perhaps that should be done?
Done. I'm also going to post a warning on this forum that I did a hard reset of master.


Top
 Profile  
 
PostPosted: Tue Dec 22, 2015 9:04 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
Geoff the Medio wrote:
For some reason, git has moved a bunch of commits from a branch to master when I pushed after attempting to rebase the branch on master, and this is all now on github. I committed and pushed a cleanup patch that, as far as I know, undoes the changes, but if someone who knows what they're doing wants to reset things (to this commit) to remove those extra commits from the history, perhaps that should be done?
You can work via PR as others. Githib has option to prevent direct push to master.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Tue Dec 22, 2015 9:31 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
Cjkjvfnby wrote:
You can work via PR as others.
This happened when I used a branch (which will eventually be merged by a pull request).


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 11:33 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
If the branch is set up to track master (which it probably is), then when you push it it'll push to master unless you explicitly state you want it to go to a branch on your fork or to create a new branch on either your fork or on master.

I've told my git settings that, for example, github/freeorion is master, you're just geoff, I'm matgb, etc. If I want to push to a new branch I command git push matgb <newbranchname>, there are other more complex commands including : stuff to create branches on a non tracked master, etc.

(I have to use command line for a lot of stuff as I switch between Linux and Windows and I haven't found a GUI that duplicates itself similarly, plus command line is normal for me from AS400 days)

I'm terrible for forgetting to checkout the right branch and cherry picking stuff in before pushing, fortunately I've only done that to master once, and it was something we wanted up soon anyway.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 2:04 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
Vezzra wrote:
Geoff the Medio wrote:
What does having a tag mean if the branch containing the commit that was tagged is deleted...?
AFAIK deleting a branch in git just deletes the "branch marker" pointing to the latest commit of the branch. This doesn't change anything about the commit history. The tag won't be affected by deleting the branch, and still point to the same commit as before.
all commits that present in this branch only and located after tag will be lost after garbage collector execution

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Mar 30, 2016 4:21 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
I am having major problems trying to copy one of Morlic's branches
Code:
git remote add morlic https://github.com/Morlic-fo/freeorion
matgb@MatGB-Desktop:~/freeorion$ git remote
banduri
dbenage
dilvish
master
matgb
morlic
silentone
sloth
vezzra
vktor
matgb@MatGB-Desktop:~/freeorion$ git fetch morlic
error: unable to resolve reference refs/remotes/morlic/AI-Chokepoints: Permission denied
From https://github.com/Morlic-fo/freeorion
 ! [new branch]      AI-Chokepoints -> morlic/AI-Chokepoints  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-Fighters: Permission denied
 ! [new branch]      AI-Fighters -> morlic/AI-Fighters  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-ProductionRework: Permission denied
 ! [new branch]      AI-ProductionRework -> morlic/AI-ProductionRework  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-refactor-ColonisationAI: Permission denied
 ! [new branch]      AI-refactor-ColonisationAI -> morlic/AI-refactor-ColonisationAI  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-repair-logic: Permission denied
 ! [new branch]      AI-repair-logic -> morlic/AI-repair-logic  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/master: Permission denied
 ! [new branch]      master     -> morlic/master  (unable to update local ref)
matgb@MatGB-Desktop:~/freeorion$
I've already deleted and re-added the remote, neither command line or my GUI are getting me anywhere, either there's a weird setting on the remote that I can't access it or I'm doing something weird, but the simple git fetch {name} works well for me with everyone else, I use it regularly.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Mar 30, 2016 4:35 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
MatGB wrote:
I am having major problems trying to copy one of Morlic's branches

I've already deleted and re-added the remote, neither command line or my GUI are getting me anywhere, either there's a weird setting on the remote that I can't access it or I'm doing something weird, but the simple git fetch {name} works well for me with everyone else, I use it regularly.


Did you ran this fetch command with sudo once (don't do that)? Because the 'permission denied' usually indicates that you tried to write to a file you don't have permission to write to.

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
PostPosted: Wed Mar 30, 2016 4:37 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
Never intentionally used sudo with git, and definitely haven't this session.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Mar 30, 2016 4:41 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
MatGB wrote:
Never intentionally used sudo with git, and definitely haven't this session.


Creating files as root and with root owner are persistent across sessions.

try:

Code:
find . -uid 0


from within the reposository to check if there is some odd file ownership going on. If should list any files that are owned by root.

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
PostPosted: Wed Mar 30, 2016 5:06 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
Note: it's Morlic's Github remote I'm having problems accessing, I'm having zero problems with my git files locally (and I'm also able to grab stuff from other forks I don't have write access to).

I've worked around it by creating a new fork at my repo and then using a PR from his fork to mine and checking that out, but it wasn't ideal, and as I suspect I'll need to grab stuff from Morlic again we do need to work out where the issue is.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Mar 30, 2016 6:27 pm 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 444
MatGB wrote:
I am having major problems trying to copy one of Morlic's branches [code]git remote add morlic https://github.com/Morlic-fo/freeorion


http://stackoverflow.com/a/15458951 ?

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Thu Mar 31, 2016 12:35 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3291
That doesn't appear to have helped
Code:
matgb@MatGB-Desktop:~/freeorion$ git gc --prune=now
Counting objects: 84292, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (28080/28080), done.
Writing objects: 100% (84292/84292), done.
Total 84292 (delta 60737), reused 77957 (delta 55504)
matgb@MatGB-Desktop:~/freeorion$ git remote prune morlic
matgb@MatGB-Desktop:~/freeorion$ git fetch morlic
remote: Counting objects: 343, done.
remote: Total 343 (delta 273), reused 273 (delta 273), pack-reused 70
Receiving objects: 100% (343/343), 168.99 KiB | 0 bytes/s, done.
Resolving deltas: 100% (282/282), completed with 52 local objects.
error: unable to resolve reference refs/remotes/morlic/AI-Chokepoints: Permission denied
From https://github.com/Morlic-fo/freeorion
 ! [new branch]      AI-Chokepoints -> morlic/AI-Chokepoints  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-Fighters: Permission denied
 ! [new branch]      AI-Fighters -> morlic/AI-Fighters  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-ProductionRework: Permission denied
 ! [new branch]      AI-ProductionRework -> morlic/AI-ProductionRework  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-refactor-ColonisationAI: Permission denied
 ! [new branch]      AI-refactor-ColonisationAI -> morlic/AI-refactor-ColonisationAI  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/AI-repair-logic: Permission denied
 ! [new branch]      AI-repair-logic -> morlic/AI-repair-logic  (unable to update local ref)
error: unable to resolve reference refs/remotes/morlic/master: Permission denied
 ! [new branch]      master     -> morlic/master  (unable to update local ref)
matgb@MatGB-Desktop:~/freeorion$
however I had never encountered prune before and given the mess my local git has got into over the time we've been using it I probably should, so thanks for the pointer.
adrianbroher wrote:
try:

Code:
find . -uid 0


from within the reposository to check if there is some odd file ownership going on. If should list any files that are owned by root.

Nope, that gave me no output at all.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Thu Mar 31, 2016 8:31 am 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
MatGB wrote:
error: unable to resolve reference refs/remotes/morlic/AI-Chokepoints: Permission denied


What does

Code:
ls -al .git/refs/remotes/morlic/AI-Chokepoints


or

Code:
ls -al .git/refs/remotes/morlic/


print out?

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 188 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12, 13  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group