How to get GitHub repository Directories via Octokit .Net API? - octokit.net

Can anyone tell me how to get GitHub repository's directories? Looking at the client.Repository API doesn't seem to have dir or it named differently?

Related

Is it possible to group git repositories into subfolders under AzureDevOps?

Recently, we migrated from our TFVC to git repository. I would like to decouple a few of our solutions into separate git repositories. Is it possible somehow to group these newly created repos under some kind of subfolder on AzureDevOps?
Is it possible to group git repositories into subfolders under AzureDevOps?
The answer is yes.
The most important thing before starting is to backup your current project/solutions.
I created a simple example to demonstrate how to accomplish it.
I created a repo with three solutions (Solution1, Solution2, Solution3)in it:
Add three subfolders (Subfolder1, Subfolder2, Subfolder3)in this repo via Azure devops web page:
Now, open our Visual Studio locally, connect to this repo. And move the solution1 to the subfolder1 in the file explorer:
Then, push this change to the repo:
Now, the solution1 moved to the subfolder1.
Update:
But basically my question was if there is possible to create
subfolders for some git repositories, not a subfolders inside git
repository
I think it is impossible to create subfolders for some git repositories. You need to create other repo in the project. When you have lots of repos, folders aren't your best friend. Tagging, quick-filter and search are.
Please check this thread for some details.

Automatically update GitHub wiki based on repository markdown files

I'm fairly new to GitHub and I've been trying to get the GitHub Wiki associated with a project to get the content from the main repository with no success.
Online there are guides on how to do this on Microsoft Azure here, but for some reason, I cannot find anything similar for GitHub. I am not sure where to ask this question so I came to the trusted StackOverflow community.
Basically I have a repository where we are uploading a series of markdown documents (see giovannellilab/protocols) and I would like the content of the wiki for the same project to be updated with pages coming from the repository. Each markdown file in the repository becomes its own wiki page. Ideally, the wiki will get automatically updated every time we push something new to the repo or we merge a new pull request.
So far I have not found an easy to implement a solution.
I've also tried to use a GitHub Action found in the marketplace, SwiftDocOrg with no success. I'm new to GitHub-actions and even follwing the guide I could not make this work.
Here the content of my .yml page:
- name: Publish to GitHub Wiki
uses: SwiftDocOrg/github-wiki-publish-action#1.0.0
with:
# A path to the directory of files to publish
path: giovannellilab/protocols
The action is failing each time (obviously something is wrong/missing, but I cannot figure out what).
Any suggestions on how to make it work in GitHub?
Any other place where I can host documentation pulling directly from a GitHub repository?
Any other better way to implement this?
Thank you very much,
Don

How to create a repository in github.com using gitpython package

I have tried to create a repository in github with my python program. I found gitpython package in web-search. I can able to pull repository but unable to create a repository in github. please help me.
Git and GitHub are different things.
The former is an open source distributed version control system. The latter is a commercial entity that provides products and services supportng Git. (Confusingly, it is also the name of many of those products.)
There is no way to create a repository on GitHub using the standard git command-line tool.
From GitPython's PyPI page:
GitPython is a python library used to interact with Git repositories.
No mention is made of GitHub, and in general git and GitPython can do basically the same things. If you want to create a repository on GitHub you could use any of the libraries listed here.
Alternatively, you could use their API directly, by POSTing to /user/repos. This method will require you to authenticate, and in my opinion using one of the libraries from the previous list is easier and more robust.

Copy files from github via SSH using SCP

I'm trying to download a file from github repository and I would like to use ssh (using scp) instead of downloading it via HTTPS. Is that even possible? Could you give an example? Thanks.
No it's not possible. Git repositories don't consist of the actual files, but a collection of the incremental changes.
Therefore you have to clone a repository to get the file.
Github only offers the HTTPS download as "services".

How do you completely remove a file on github

I've seen the command needed to remove a file and erase it from the history on git. Is there a way to do this with the github website? If not, it looks like I need to know where the file is to do it with a git command. Where does github store the local repositories?
See: https://help.github.com/articles/remove-sensitive-data
To get a local version of the repository, look up the URL from the repo page on Github and clone as explained in the link above.