简体   繁体   中英

How to synchronize / mirror the 'Files' Repository and the 'git' Repository in SourceForge?

we are at the moment building a community utilities repository in sourceforge which will be managed by several 'managers' but accessible to the community. I have initially uploaded all the utilities into the 'Files' tab of the project. After this, I could see that git could also be used which seems handy for us.

So have created the project Repository in git/SourceForge and pushed the entire project, which is fine.

The question is that I have a strong feeling that the files listed in the sourceforge 'Files' tab are totally distinct from files I can see in the 'Git' tab.

We would like to manage the files from git, but have the files visible and available from the 'Files' tab.

Is this possible? I have a feeling that the files in the 'Files' tab are stored in a different place than the files in the 'Git' tab.

Thanks in advance

Yes, they are in completely different places at SF and you cannot synchronize them automatically. One of the reasons you cannot synchronize git and files is that git repositories at SF are bare, they don't contain working directory, they only contain object database and references.

Do you know you can use ssh to login to SF, scp , sftp and rsync to transfer files to and from? I use it all the times since 2004.

To login to your account run

ssh -t $SF_USER@shell.sourceforge.net create

After login run sf-help --all to see all your directories.

Files, repositories and web-files (do you know you can publish a site at SF?) are in project-specific paths. For example I'm a member of SQLObject project, my user name at SF is phd . The repositories for the project are at /home/git/p/sqlobject/ , files are at /home/frs/project/sqlobject/ and web-files (published at SQLObject ) are at /home/project-web/sqlobject/ . These are just an example but your directories are similar.

To upload file I use sftp frs.sourceforge.net:/home/frs/project/sqlobject and upload local files to SF.

To update web site I run

rsync -hlrtP4 --del . web.sourceforge.net:/home/project-web/sqlobject/htdocs/

Replace sqlobject with the name of your project and start uploading.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM