libgit2 / pygit2 is there a way to do an update-server-info? - libgit2

I need to prepare a repo for access from an HTTP server.
To do seem it seems I need to run git update-server-info on the repo which updates some files that make it accessible over a dumb HTTP server.
I am using Pygit2 / Libgit2 to create the repo. Does libgit2 allow me to do a update-server-info or do I need to somehow execute the command line git to do so?
I have searched extensively so if it is available then I'm looking in the wrong places to find how.

libgit2 does not offer any support for the dumb HTTP protocol, but since this is the server, it wouldn't help much it implemented update-server-info.
In order to support the dumb protocol you need to make git update-server-info run after every push into the server's repo via one of the hooks which git provides, so you need to be using git for this anyway.

Related

How make changes on vue project in hosting

I have vue project which published on Digital Ocean. The main problem is when i make some changes on FileZilla it is not affect on website. How can i solve this issue?
This is not an issue per-se. This is just the way how modern web development works. Vue.js (but also Nuxt) is using a bundler right now (Webpack, Vite are the most common), hence to go to production it needs to be bundled each time you push something to it.
If you upload something via FTP or SSH and edit some source code, a bundle step will be required in order to get any changes on the actual webapp.
Backend languages may not need that, for example you could SSH into a server and change some .php file, if you F5 the page it will be updated in real time. But this is not how frontend JS code works, it needs to be optimised.
Another thing, sending code via SSH/FTP is not really a good workflow because it is not easily trackable, no version-controlled, will not trigger any build flags in case of an error etc...
The best approach is to have a git repo + some build step included in some CI.
A common platform for it is Netlify, you connect a Github repo, you tell which command to use to build the project and each time you push some code, it may do some checks/tests/optimizations/etc... via Github Actions before being released automatically to production (updated on your webapp).
This workflow have a lot of benefits as one may tell but is also de-facto, the official/regular approach for modern Web development on the frontend.

cPanel auto-deploy repository and run npm script

I've locally written code for a website that has since been pushed to a private github repository owned by my organization. I would like to set up my Apache web server's subdomain to automatically pull that code every time a push is made to a certain branch of the Github repo.
I've read many documentations and tried many things, nothing seems to be working for me.
Could someone please provide detailed steps or a method that has worked for them in this situation?
EDIT
With cPanel's Git Version Control Tool and SSH keys, I've been able to get my repository cloned properly. Now, I still need a way to make cPanel run "npm run start" every time the repository is deployed. Any thoughts?

Which SCM system to use with Xcode 4 for a lone developer?

I'm an iOS developer looking to better manage the projects I am creating. I've never touched SCM before so I'm not sure which system to use.
I'd like to keep track of changes to the different apps I'm making for my boss, but also have them in a centralised place, and be able to branch off and be working on features separate from the main app and then merge the changes back in when I'm finished. All of this will be done locally (stored on an external hard disk in my office), and once versions are complete I'd like to be able to export a copy without the SCM features to send to my boss.
I've just upgraded to Xcode 4 and noticed Git is built in. I played around with both Subversion and Git, but it sounds like Git is what would fit my needs better. However, it seems to be totally different to Subversion. The Xcode 4 documentation suggests Git is best for lone developers, but that doesn't seem the case. If the git repository is inside your working copy, how on earth do you make branches of it? Where do you send your changes to? Do you copy the entire working directory and use that as your branch?
Just looking for someone to explain in plain english which SCM system would be best for a lone developer to use and any tutorials people may know of to help me understand it.
Thanks for any help!
Go for git!
The repository actually resides in your working directory. There is .git folder which contains all the data about your branches and commits and whatsoever. You can create a bare repository(only the contents of the .git folder) if you like but having both in the same place is nice, especially if you are a single developer who doesn't need distribution.
Branching in git is very easy:
# create the branch
git branch mybranch
# switch to branch
git checkout mybranch
# show branches
git branch
Git does not depend on a server like svn does. You can have distributed development by using remotes but this is not necessary.
If you like to make a copy for your boss without the git files in it do a
git archive branchname --format=zip -o tree.zip
I suggest some reading on git
Git in five minutes
Git Community Book
The Thing About Git
Branching in git is very different from SVN. Branching happens in place, in stead of in another directory.
Read this book and other resources to get a better understanding about how git works
About the centralized server, Git is a decentralized SCM. That means that every clone contains the entire repository, not only the current working directory.
That doesn't mean you can't have a central repository. On the central server you create a bare repository, and on you're local machine you clone from that repository, push and pull from that repository, often through ssh.

Using GIT or SVN in XCode 3/4 without server

Ok, perhaps I'm trying to accomplish something not doable.
I am a single developer (not part of team).
I'm trying to get some kind of versioning system going. I had used CVS with XCode 3, but XCode 4 no longer has that as an option. I've heard that SVN and Git are better alternatives anyway.
Basically, I've wasted more than half a day trying to get XCode to work with SVN / Git out of the box. I do not have a server running, and would rather not expose my project on a server.
It doesn't make sense for me to have a separate user just to run the Git/SVN Servers, either.
I'm just trying to have version control using either one, in the simplest possible way.
I've tried to add Repo, using local file path (/Volumes/AAA/BBB/Repo) where I manually created the "Repo" directory. I've set the type as Subversion (and also tried Git). XCode says "Host is reachable". But, the Commit functionality is not there (Disabled). I can't import my working directory.
I just don't get it - must I have a server running in order to have SVN/Git, or can XCode just do it through command line? I much more prefer it being done over command line, since the server is complete overkill. Or, am I missing something? Maybe I'm putting in the wrong settings into XCode?
This isn't strictly an XCode 4 issue, I had the same issue with XCode3, but at least it had the CVS option - now it's gone.
With Git you don't need a central server or even a central repository unless you have multiple people on the project. SVN requires you to have a central repo & server running all the time, but with Git you can simply git init a new repo and start using it. If you don't have a central repo you will never use push, pull, or fetch.
Xcode's help mentions the following:
Choose Git or Subversion Xcode supports two SCM systems: Subversion
(often abbreviated svn) and Git. Subversion is always server-based and
the server is normally on a remote machine, though it is possible to
install one locally. Git can be used purely as a local repository, or
you can install a Git server on a remote machine to share files among
team members. The Xcode 4 installer installs the Git and Subversion
tools when you select System Tools. If you are working alone, it’s
generally easiest to use Git, as you don’t need to set up a server. In
fact, Xcode can automatically set up a Git repository for you when you
create a new project (see “Create a Git Repository For Your New
Project”). For a group project, the choice of Subversion or Git is
usually a matter of taste and prior experience. In so far as is
possible, Xcode provides a consistent user interface and workflow for
users of either Subversion or Git.
So the official advise is that in your case, Git is the easiest solution. I'm now in the same position as you described and will be trying Git as advised.
Previously, when working for a small company, we used a dedicated leftover MacMini as an SVN server; this was quite easy to set up, and worked like a charm for many years. Be aware that the SVN integration of Xcode 3 was better than that of Xcode 4 though, so that I ended up using Xcode 4 for development and basic SVN usage, together with Xcode 3 for SVN stuff that Xcode 4 wouldn't do anymore.

migrating from gforge to teamforge

can anyone give an detailed procedure on how to
migrate projects from gforge version(4.5) to teamforge version 5.2.0.
Migration includes source repository, bug tracking, wiki and discussions.
is it possible to shift all of them.
What's the best way to handle a situation like this?
Thank
You
Teamforge uses Subversion, so assuming you have commandline access to the server then you can use the svnadmin dump and svnadmin load commands.
You will need to run these commands for each repository.
Some (I don't know which) of the pages and wiki are also stored in subversion repositories, so you may be able to migrate that using the same method.