Board index FlightGear Development

Entangled in Git and Gitorious  Topic is solved

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Entangled in Git and Gitorious

Postby Necolatis » Mon Dec 02, 2013 3:21 am

Philosopher wrote in Mon Dec 02, 2013 3:18 am:He means remote... (remember? he doesn't like typing on netbooks/tablets ;))


Sorry.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2075
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Entangled in Git and Gitorious

Postby Philosopher » Mon Dec 02, 2013 3:23 am

Umm.... doesn't look like you cloned from git@gitorious.org:fg/fgdata.git... I think Hooray can tell you how to add that as a remote to pull from (pretty simple, you could even google it).
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Entangled in Git and Gitorious

Postby Hooray » Mon Dec 02, 2013 3:25 am

P.is right, that's what I was just going to post/ask next - how exactly did you clone, is that a normal/full clone, or some shallow repo ?
if it's a normal clone:
git remote add origin git@gitorious.org:fg/fgdata.git
and yeah, thanks: I did mean "remote" not "remove" :oops:
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11569
Joined: Tue Mar 25, 2008 8:40 am

Re: Entangled in Git and Gitorious

Postby Philosopher » Mon Dec 02, 2013 3:26 am

Nm, I googled it for you (kinda complex actually). Try:
Code: Select all
git remote add origin git@gitorious.org:fg/fgdata.git
git branch -u origin/master
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Entangled in Git and Gitorious

Postby Necolatis » Mon Dec 02, 2013 3:29 am

Philosopher wrote in Mon Dec 02, 2013 3:23 am:Umm.... doesn't look like you cloned from git@gitorious.org:fg/fgdata.git... I think Hooray can tell you how to add that as a remote to pull from (pretty simple, you could even google it).


I did that on Gitorious website as instructed on the flightgear wiki. Then I checked out the clone to my computer.
But later I think I did something bad, thought I was getting the hang of git. Now am confused about how to proceed, or what even is wrong.

Code: Select all
Nikolai@NIKOLAI-HP /g/Games/FG/Git/fgdata (master)
$ git remote add origin git@gitorious.org:fg/fgdata.git


Should I proceed with these?

git remote -a

git branch -r
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2075
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Entangled in Git and Gitorious

Postby Philosopher » Mon Dec 02, 2013 3:31 am

Yeah, make sure it works. If branch-r doesn't list anything with "origin", run the git branch -u command I posted above.
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Entangled in Git and Gitorious

Postby Hooray » Mon Dec 02, 2013 3:32 am

once you have the correct remote setup, you can simply reset to origin/master and then "git pull origin master".
don't worry there's no real chance to break things like this (so far).
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11569
Joined: Tue Mar 25, 2008 8:40 am

Re: Entangled in Git and Gitorious

Postby Necolatis » Mon Dec 02, 2013 3:32 am

Code: Select all
error: unknown switch `a'


Version is:

git version 1.8.3.msysgit.0
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2075
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Entangled in Git and Gitorious

Postby Hooray » Mon Dec 02, 2013 3:35 am

same thing as before: git remote -v
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11569
Joined: Tue Mar 25, 2008 8:40 am

Re: Entangled in Git and Gitorious

Postby Necolatis » Mon Dec 02, 2013 3:37 am

Code: Select all
clone   git@gitorious.org:~necolatis/fg/necolatis-fgdata.git (fetch)
clone   git@gitorious.org:~necolatis/fg/necolatis-fgdata.git (push)
main    git@gitorious.org:~necolatis/fg/fgdata.git (fetch)
main    git@gitorious.org:~necolatis/fg/fgdata.git (push)
origin  git@gitorious.org:fg/fgdata.git (fetch)
origin  git@gitorious.org:fg/fgdata.git (push)
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2075
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Entangled in Git and Gitorious

Postby Hooray » Mon Dec 02, 2013 3:40 am

git checkout master
git reset origin/master
git pull --rebase origin/master
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11569
Joined: Tue Mar 25, 2008 8:40 am

Re: Entangled in Git and Gitorious

Postby Necolatis » Mon Dec 02, 2013 3:41 am

Code: Select all
Nikolai@NIKOLAI-HP /g/Games/FG/Git/fgdata (master)
$ git checkout master
Already on 'master'

Nikolai@NIKOLAI-HP /g/Games/FG/Git/fgdata (master)
$ git reset origin/master
fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2075
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Entangled in Git and Gitorious

Postby Philosopher » Mon Dec 02, 2013 2:40 pm

git fetch origin master # fetch the commits, hopefully shouldn't take too long since most should already be here...
git checkout origin/master # check out the remote branch
git checkout -d master # delete the old master
(-D if needed)
git checkout -b master # create a new master from this remote branch
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Entangled in Git and Gitorious

Postby Necolatis » Mon Dec 02, 2013 2:55 pm

What about the fatal error I get everytime I mention origin/master?

fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2075
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Entangled in Git and Gitorious

Postby Philosopher » Mon Dec 02, 2013 2:58 pm

Yeah, that's what git fetch should fix...
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest