librelist archives

« back to archive

libgit2 - basic requirement.

libgit2 - basic requirement.

From:
Jaffer
Date:
2012-07-16 @ 18:19
Hi,

 

This is Jaffer, I am working on a project where it requires the cloning the
repo from Github, commit and push changes and pull the changes
automatically(via a service).

 

 

I looked in LibGit2 and its interesting. Can you please point me out me or
provide some code samples for doing this?

 

Things I need to do:

 

 

1.       Clone the repo from github to local drive.

2.       Make some changes to the file manually.

3.       Commit it and push the changes. 

4.       Pull out the changes made by other user. 

Your help in this is greatly appreciated. Thanks in advance. 

 

 

Cheers,

J

 

 

 

Re: [libgit2] libgit2 - basic requirement.

From:
Josh Bleecher Snyder
Date:
2012-07-16 @ 18:21
> I looked in LibGit2 and its interesting. Can you please point me out me or
> provide some code samples for doing this?

Follow links here:

http://stackoverflow.com/questions/8551169/how-to-clone-fetch-a-git-repository-with-libgit2/8553578#8553578

And Google is your friend. :)

-josh

Autoreply: "[libgit2] libgit2 - basic requirement."

From:
Date:
2012-07-16 @ 18:18
Auto Response: Please email [ support@droidtweak.com ] for any sales or 
support questions.

Or go direct to our portal: 
http://media.droidtweak.com/contact-us

If your wanting to promote your app, you can do so by going to our online 
form http://droidtweak.com/media

Like us @ http://facebook.com/androidfans

Re: [libgit2] libgit2 - basic requirement.

From:
Carlos Martín Nieto
Date:
2012-07-16 @ 19:21
On Mon, 2012-07-16 at 23:49 +0530, Jaffer wrote:
> Hi,
> 
>  
> 
> This is Jaffer, I am working on a project where it requires the cloning the
> repo from Github, commit and push changes and pull the changes
> automatically(via a service).
> 
>  
> 
> 
> 
> I looked in LibGit2 and its interesting. Can you please point me out me or
> provide some code samples for doing this?
> 
>  
> 
> Things I need to do:
> 
>  
> 
> 
> 
> 1.       Clone the repo from github to local drive.

The fetching part is done in examples/network/fetch.c and a fuller clone
command is being implemented in
https://github.com/libgit2/libgit2/pull/778 which you may want to take
as the steps to take, or look at git's clone.

> 
> 2.       Make some changes to the file manually.

This has nothing to do with libgit2.

> 
> 3.       Commit it and push the changes. 

Pushing is being implemented right now.

> 
> 4.       Pull out the changes made by other user. 

Pull out? If you mean merge, that's not implemented. If you mean look at
them, then that's not a problem, take a look at the commit, tree and
blob interfaces.

   cmn