Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
50 user(s) are online (44 user(s) are browsing Forums)

Members: 0
Guests: 50

more...

Support us!

Headlines

 
  Register To Post  

How to use sgit?
Home away from home
Home away from home


See User information
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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: How to use sgit?
Just popping in
Just popping in


See User information
@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

Go to top
Re: How to use sgit?
Just can't stay away
Just can't stay away


See User information
@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".

Go to top
Re: How to use sgit?
Just can't stay away
Just can't stay away


See User information
@Hans

To commit all changes I just do:

git add .
git commit

This should also work with sgit I think.

Go to top
Re: How to use sgit?
Just can't stay away
Just can't stay away


See User information
@salass00

git add -u might be safer?

Go to top
Re: How to use sgit?
Home away from home
Home away from home


See User information
@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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: How to use sgit?
Just can't stay away
Just can't stay away


See User information
@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.

Go to top
Re: How to use sgit?
Home away from home
Home away from home


See User information
@all

Wow, thanks guys, learned a few things today

Go to top
Re: How to use sgit?
Home away from home
Home away from home


See User information
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

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project