MSIX installer project - which files to commit to repository? - version-control

I've created an MSIX installation project for my WinForm app, and now I'd like to commit it to my repository (git). I can't figure out which files are essential and which are now.
I assume I should commit .wapproj, <my public key>.pfx, Package.appxmanifest and the whole Images folder.
I know I shouldn't commit .user or obj files.
What do I do about bin and BundleArtifacts folders and why?

You can look at a repo on such as this Build demo to see which files should be included in source control. Essentially it is the .wapproj and the .appxmanifest files, plus the images (and then of course the actual app source code).
You shouldn't include the .pfx file since that also includes the private key used to sign the package.

Related

GitHub releases with generated files

I have a GitHub repo and would like to use GitHub Actions to create a release with a generated file included:
push a commit with a tag
the GitHub Action starts
it runs yarn run build (generates dist/index.js)
release is created that includes the dist folder
So far, I have not been able to do this. I've been able to use "marvinpinto/action-automatic-releases#latest" action to package the dist folder as an additional asset, but that's not it.
I want the Source code (tar.gz) in the GitHub release to contain the dist folder.
What I'm trying to do is use this generated asset as a yarn dependency, which works if I use the Source Code (tar.gz) but not if I use the additional generated asset.
The entries your images show that are labeled “Source code (tar.gz)” and “Source code (zip)” are autogenerated from the contents of the repository and contain only and exactly what's in the repository. They can't be modified in any way because they aren't persisted: they may be regenerated in the future. That's also why they may change (so, for example, the hash of the contents need not be stable).
If you want to include additional dependencies in your tarball, simply upload your own source release that contains the generated files. Many projects do this for various reasons, and you can do it, too.

How to get source code from GitHub data export?

I decided to backup all my github data and found this: https://help.github.com/en/github/understanding-how-github-uses-and-protects-your-data/requesting-an-archive-of-your-personal-accounts-data
I managed to get the .tar.gz file and it seems to contain all my repositories but there is no source code in there. Judging by the size, it looks like some kind of archive in objects/pack/*.pack
Is there any way to access original source code?
it looks like some kind of archive in objects/pack/*.pack
According to Download a user migration archive:
The archive will also contain an attachments directory that includes all attachment files uploaded to GitHub.com and a repositories directory that contains the repository's Git data.
Those might be bare repositories or bundles.
Once uncompressed, try and git clone one of those folders (to a new empty folder)
The OP johnymachine confirms in the comments:
git clone .\repositories\username\repository.git\ .\repository\
Meaning repository.git is a bare repo (Git database only, no files checked out)

How can I include a download link to an arbitrary file in a Github Pages page?

It my GitHub Pages page for my project, the only download options are for the .zip and the .tar.gz files (the standard ones including "See this on GitHub"). I want to have a link to download another file (a .exe file) without having to put it in my GitHub repository. How can I do this?
I'm not sure how GitHub Pages relates here (this likely depends on the theme you're using), but one good option for sharing pre-built versions of your software is to create a GitHub Release. This will prompt you to create a tag for the version of your source code you wish to release and let you upload additional files:
Optionally, to include binary files such as compiled programs in your release, drag and drop or select files manually in the binaries box.
This file won't be added to your Git repository. It's attached to the GitHub-specific Release, and it can then be downloaded from your repository's releases tab, just like source archives.

Publishing to github results in an empty repository

I am new to git. I downloaded the desktop version (for Windows). I dragged the folder containing my project into the big window, "Get started by adding a repository." All the files showed up in the left window. Then I clicked on "Publish Repository". It then shows 143 files have changed, with 0 unsynced.
But when I go to my account on the git website, the repository is empty. The only files in it are .gitattributes and .gitignore. The whole idea here is that I want to share this project with other people.
Help out a git newbie and explain how I get the entire solution into git?
Thanks!
As you already have the remote repository at GitHub, you should use the clone option first to clone your repository locally.
This will create a folder (your repository clone) on the default location containing those two files.
Then you can copy your project files to this folder and try to sync again.

Is there a way to control what gets into a GitHubs zipball?

Every GitHub repo has the Download ZIP button, but is there a way to control what gets into the final zipball. For example we do not need and hidden files there, or even - unit tests.
Excerpt from Pro Git book:
You can tell Git not to export certain files or directories when
generating an archive. If there is a subdirectory or file that you
don’t want to include in your archive file but that you do want
checked into your project, you can determine those files via the
export-ignore attribute.
For example, say you have some test files in a test/ subdirectory, and
it doesn’t make sense to include them in the tarball export of your
project. You can add the following line to your Git attributes file:
test/ export-ignore
Now, when you run git archive to create a tarball of your project,
that directory won’t be included in the archive.