Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
64 user(s) are online (49 user(s) are browsing Forums)

Members: 0
Guests: 64

more...

Headlines






How to use sgit?
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2310
I've switched to using a git repository, and am having trouble using it on AmigaOS. AFAIK, SimpleGit (sgit) is the only usable tool we have. So far I've managed to "clone" a repository. Getting changes from the repository was complicated because there's no pull command.

Where I'm stuck is pushing changes back to the remote repository. Executing sgit push origin results in:
No refspec given and no refspec configured. Pushing is probably a noop.

Sure enough, it doesn't push the changes. So, what am I supposed to do? What is a refspec? How do I set it? And why wasn't it set up when I did the original sgit clone?

Also, is there a way to commit all changes without having to manually "sgit add" every single file that changed? With git you do a git add -A, but sgit doesn't recognize -A.

NOTE: I'm used to svn, so I'm not used to git's way of doing things yet...

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: How to use sgit?
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 178
@Hans


I haven't tried much with sgit yet, but when I moved from SVN to git I had the same questions! You have to commit changes first before calling git push. Rather than having to add every change to the staging individually, you can call

git commit -am "...."

the -a adds all changed files in one go.

Cheers

Billy

   Report Go to top

Re: How to use sgit?
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1378
@Hans

At first, configure user.name and user.email, you might end up with anonymous commits otherwise. IIRC it's done like:

sgit config user.name yourname
sgit config user.email youremail

Then check .git/config.

When pushing to remote, give the branch, like sgit push origin master, or sgit push origin fix-for-bug.

Git pull is a short for fetch + merge. To "pull", do "sgit fetch origin", followed by "sgit merge origin/master".

   Report Go to top

Re: How to use sgit?
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1809
@Hans

To commit all changes I just do:

git add .
git commit

This should also work with sgit I think.

   Report Go to top

Re: How to use sgit?
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1378
@salass00

git add -u might be safer?

   Report Go to top

Re: How to use sgit?
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2310
@all

Thanks. I got the parameters for sgit push wrong: "sgit push origin master" works. The error message sure is confusing, though. SimpleGit's readme could use some extra instructions.

With git, "git add -A" adds all changes to staging before you commit. This doesn't work with sgit. Likewise, "sgit commit -a -m" doesn't work either.

Sgit feels like it's almost there. It's missing things like: git pull
git add -A

I hadn't heard of "git add ." or "git add -u .". While I hope it works, it sounds rather tedious vs "git commit -a -m".

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: How to use sgit?
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1809
@Capehill

I usually do a "git status" before "git add ." just to be safe.

BTW if there are files in the working directory that should not be tracked they should be added to the .gitignore file.

   Report Go to top

Re: How to use sgit?
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4492
@all

Wow, thanks guys, learned a few things today

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to use sgit?
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2310
Had to dig up this thread again, as it's been a while since I used sgit. The details really should go sgit's manual.

Would be great if we had a tool like Tortoisegit...

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top





[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project