How do you completely remove a file on github - 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.

Related

How to create a new file in github and add there existing files?

I have files in repository. I want them to be grouped inside a folder. How can I do this?
It seems that I need to add new file if I want to create a folder.
From how you worded your question, it seems like you're trying to work on github directly from the website.
The usual way github works is:
if you have a repo on github and you want to modify it, first 'clone' the repo into your local computer,
use these instructions https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
then just change folder structure like you would normally on File Explorer (windows) or Finder (mac),
then follow the commit instructions and 'push' up your changes to github
use these instructions
check status of your recent changes:
git status
add the files that you want to include in the commit
git add nameOfFile
check status and the file you want to include should now be green
git status
use this to send to github
git push
Overall github docs here:
https://learn.microsoft.com/en-us/training/modules/introduction-to-github/

Can you link a MD file to you repository's wiki?

So I'm using an npm package called jsdoc-to-markdown to generate my documentation files, and I want to link them to that same repo's wiki. So how would I do that??
my repo
On GitHub, your wiki's git repository is stored at "https://github.com/org/repo.wiki.git". You'll want to copy your files to there and then push to it.
EDIT: For you, that would be https://github.com/ErrorBot1122/Roblox-File-Handler.wiki.git.

How to transfer Github Gist to Repository?

I am new to Github. I recently have created a gist https://gist.github.com/8d11e24576c94b2c07a9a48288082588.git and want to transfer it to my repository at https://github.com/Muhammad-Ammar-Masood/Log-In-Page.git.
The simpler approach would be to clone your repository, and copy in it your gist, as a new file.
From there, add, commit and push.
Note that you can, from command-line, list your gists with gh girst list and view the content of a particular gist with gh gist view
gh gist view https://gist.github.com/8d11e24576c94b2c07a9a48288082588.git
(you need to install gh first)
You can also, since yesterday, do it online by going to your repository Muhammad-Ammar-Masood/Log-In-Page, and use GitHub Codespace by typing ..
You can add your gist in the online VSCode there.
You can, download Github Desktop on "https://desktop.github.com/", log in , create a new repository with GitHub Desktop, then choose a local directory on your PC for the newly created repository.
You can go to your Gist and choose to download as zip at the right end of the options
Screenshot of Gist Url and the download button highlighted
You can extract the zip file to your local directory assigned for the newly created repository.
On your GitHub Desktop : You can commit and push the changes of the repository to your GitHub.

New to git--just need to sync one file

I managed to finally get EGit in Eclipse to work (still don't know how) and I've committed/pushed my current project up to GitHub. So far, so good. Looking at it on GitHub's site, I see it wants me to make a README.md file to provide a nice description. Fine, I think, I'll just use the tool it's providing me with to get it started, then have it sync back down to my local computer where I can further modify it and keep it synced.
So I created a quick README.md file on GitHub's site. But now, when I perform a "Pull" action in Eclipse, I am told that there's nothing new to pull, or something like that. Why is it not getting the new file that was created on GitHub's site, and how can I get it so that I can make changes to it whenever I want?
If you have git installed you can use a terminal and type in the root of your repository:
git pull origin master
or you could try checking out only that file:
git checkout README.md

How to hide unmodified files while check in Github

I am using Github in our Project.
When I am checking in Github to pull data from original master it is displaying all the files but I need the files which are changed by me.
You can use git log to display updated files by author.
See for instance "Can I get git to tell me all the files one user has modified?"
git log --pretty="%H" --author="authorname"
(replace authorname by your own, as you specified it in git config user.name)
After a pull, you can log between master#{1} and master.