I use other API to upload MD to github's directory, and trigger workflow for follow-up work
I need to add a section to the workflow to find files and rename the files, replace some characters with the current date, I tried adding sed, find commands, but it doesn't work, what should I do?
enter image description here
Related
Where can I find .gitattributes file on GitHub website or in my repository? I don't use git command line and use website for all uploads. Recently I have posted a SQLite file along with a Python file but in languages it is showing only Python.
Before you read my answer, kindly check https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
It effectively tells you that you either have a file of .git/info/attributes or you might have a .gitattributes file somewhere.
You can search for any files (including .gitattributes) via clicking on the Go To File button
and then typing in the file you are searching for (.gitattributes in this case):
If you find your file, good! If not, then you will need (sorry !) to clone your project and check whether there is a .git/info/attributes/ file and see whether there are any attributes that are contradicting your aim. You can create a .gitattributes file (if it doesn't exist) in your root folder and git push it.
I have a built react app in the docs directory of my project. The project is set to have it's github page source to that directory. All that works fine.
https://pgooch.github.io/find-your-ross/#/
As you can see, it all works, notably the image assets, which are located here.
https://github.com/pgooch/find-your-ross/tree/master/docs/static/media
While all of that works absolutely great, the markdown file in that directory 404's.
https://pgooch.github.io/find-your-ross/static/media/_linked_readme.d73385c3.md
The file appears in the repo as you'd expect (it's at the very bottom of the list). I have; waited more than 8 hours, tried different browsers on different devices, and checked that the permissions were good, confirmed that the file names were cased the same. No difference. This file 404s when viewed directly or fetched (as can be seen by clicking about).
The reason why the _linked_readme.d73385c3.md file is not coming up on GitHub pages is due to Jekyll ignoring the file which has a name starting with an underscore.
If you are not using Jekyll, just add an empty .nojekyll file within the docs folder. You can just create the file and commit it on GitHub UI or create the file on your local machine, commit it and push it to the GitHub repo. Once the file is added within the docs folder, the _linked_readme.d73385c3.md file will come up on your GitHub pages site.
Or if you have the option of renaming your file, just drop the underscore at the beginning of the file and rename it from _linked_readme.d73385c3.md to linked_readme.d73385c3.md.
Reference: GitHub
I want to add a folder that has 713 files 150 folders inside it.
Uploading directly shows an error that I cannot upload more than 100 files at once.
Is there any chance I could upload a .rar file and then later extract in github?
There is no way to send an archived file and extract it in GitHub. However, Like Fake Name said, you need to download Git on your system and use it to send your files to GitHub. You can go through the tutorials on Git here.
Yes, you can't upload more than 100 files using the Graphic Interface.
You can instead upload a .rar instead as you said, but it's not recommended. When you will try to update the repository you will find that you will re-upload all the .rar.
So what I recommend you to do is upload using the terminal (using terminal you can upload more than 100 files).
And for information on how you upload on GitHub using terminal, follow those steps:
https://help.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line
I was performing commits with minor changes in my code and did a lot of them. At the end when I see my github account couple of files are redundant with same name but with a tilde character at the end.
Example : There are 2 files index.html and index.html~
If I pull the latest version to my local repository to remove them, I don't see the files with (~) at the end. I however did some edits directly on the github web portal. Is it because of that?
I didn't create multiple branches as well, but was working on the master branch.
I would like to know why there are redundant files and how to get rid of them from my github.
You probably did
git add .
You may not have '.gitignore' file too.
The ~ files are created by your text editor when you are editing your file.
Just create a .gitignore file and add this to the file
~
Then commit the gitignore file too.
In the future, avoid using
git add .
Sorry if this is a dumb question. I have looked over the documentation and my search for directory or folder did not come up except in reference to cloning entire github directories.
I have also looked over this a previous question "How do I add files and folders into github repos?", but it does not seem to answer this question.
An example of what I am trying to create can be found at https://github.com/rstudio/shiny/R with R being the sub-directory that I would like to create.
Thank you as always for your consideration,
Francis
Git only tracks files, not directories. So you can't have an empty directory, it mush have at least one file in it, in order to be in git.
You can create a new file in a new directory through GitHub's web-interface. See this explanation.
You can specify a new file in a new directory in the file name like directory/file.r or dir/subdir/file.r.
If you don't want any code in the directory, you could add a blank file named README.
P.S. That repo already has a directory R, you can see it here