I've build a static react website using create-react-app and deployed it in netlify using git and github. Turns out, I've to make a small change in my website now. What should I do so that the changes reflect on the already deployed site. I committed changes in github but the change is not showing in the live deployed url.
You can commit a new version of your website easily.
after editing or changing the file in you need to use
git add --all
and commit the file by the following command.
git commit -m"you can add you commit message here'
after these steps, you can add the remote by the following command.
git remote add remote-name https://repo-link-here..
if you already added remote you can skip the step just top of this sentence.
after that, you can push the committed branch by the following command
git push remote-name branch
the default name of remote is origin
the default branch is master
you can also use the default names also.
Related
Good afternoon!
I have seemed to have done a mistake in git. I was trying to clone a repo so I could push a project code to the repo, but got an upstream error and did git pull which didn't work and I tried to revert back to my initial commit which deleted my files. I did get them recovered using git checkout HEAD [filename], but when I go to open the said file I get unable to open error on visual code studio, and there is no content.
I ran the git show command and it shows all of my files and their contents. I also ran the history command, but it doesn't show all of the commands I have made.
How do I recover the full file?
Turns out VScode was having an issue. Opened the project using sublime and all of the code is there.
My goal is to get all the markdown files of a git Server and to display them as a kind of documentation platform for the project.
Is it possible to get a tree of all currently committed files of a git repository using command line?
Or is there any other possible option to get all markdown files including their path from a git repository?
(The main reason is a bonobo git server... if nothing else helps something platform specific is ok. But the goal is to make it work with every git)
(It would be even better if there is a JavaScript option to do that)
I recently deployed my GitHub project in aws using Amazon Linux 2 AMI.
I installed npm, MongoDB, node and cloned the Github repo into the new instance that I created by sshing into it.
I am running the server with the forever package of npm.
Now, I made some changes in the code and pushed it to my Github repo but it's not being reflected in my project when I try to access it from outside.
So, how to redeploy it so that I see my changes when I access it from outside world?
I found this video which shows how to redeploy but it's not feasible in my case to do it.
Now, I made some changes in the code and pushed it to my Github repo but it's not being reflected in my project
Pushing to GitHub is one step.
But you still need to ssh to your execution environment (aws), and pull from GitHub in order to get the latest.
Then your npm application would have a chance to display your changes.
As an alternative to forever restart, you also can use PM2, as recommended here.
Another option would be to add a GitHub Action, like one of the deployment actions, in order to automate that step.
AWS proposes dedicated GitHub actions.
Full example: "Github Actions for web apps" from Luke Boyle.
From what I'm able to figure out you need to do the following steps:
Do a git pull after logging into your server via ssh.
cd toTheFolder where your git repo is located
git pull origin yourBranchName
forever restart or forever restartall should restart your server and your changes should reflect there.
And as VonC suggested you should go for PM2 instead but for now you can continue with forever. PM2 is very similar to forever but with a lot more features available.
I used create-react-app to make a simple playlist creator with Spotify's API. I updated my redirectUri to the surge domain: http://jamming-1990.surge.sh/ and updated it on the dashboard of my app on Spotify's site as well.
I ran npm run build and followed the steps from the command surge, I get the output that it was created successfully but when I go to the domain, http://jamming-1990.surge.sh/ I get a 404.
Not sure what steps I missed, or why it's not deploying.
When inputting the path you must make sure to be in the build folder instead of the main root!
I'm really new to development in general, and I have recently followed through the angular 2.0 tutorial. What I'm wondering is how I would be able to host say the tutorial project online at github pages. I've tried uploading the project to my repository I created for the github page, but it doesn't seem to work.
You can upload and commit an existing file to a GitHub repository. Drag and drop a file to any directory in the file tree, or upload files from the repository's main page.
On GitHub, navigate to the main page of the repository.
Under your repository name, click Upload files.
Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file.
Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is master, you should choose to create a new branch for your commit and then create a pull request.
Click Commit changes.
Also recommend using Git Bash: https://git-scm.com/downloads
Here are the procedures for uploading with Git Bash: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/