This is more of a generic post. I am posting some of the Bash/Linux/Windows commands i find useful everyday!
Source Control :Git
When you want to push your local project to GitHub, create a repository (Don’t add a Readme file yet) on GitHub.
On your local workstation, fire the bash utility in the root folder of your project on your windows file system.
On the Git Bash, run:
git init git remote add origin https:// (link to your online repository) git remote -v (Just to confirm your remote repo) echo 'node_modules'>>.gitignore (Files you want to ignore to pushing to GitHub) git add . git commit -m "First commit" git push origin master
A times you may have commit issues due to file conflicts:
Open the conflicting file -edit and merge the head accordingly. Then;
git add filename git commit -m "merged file A and B"git push origin master
Ngrok: (helps you expose your localhost to public internet)
http localhost:<port> (Windows, where port is your port number) ./ngrok http <port> (Linux, where port is your port number)
In Oracle compute, you might want to run a “screen” command to run the ngrok on detached mode:
screen-S <name of the new screen> This opens a new Screen.
Deploy ngrok on this screen. When done press Ctrl +A+ D to exit.
To confirm the the screen got created:
screen -ls (shows you all the screens and their ids named "Detached")
To re-access the screen:
screen -r <screen_ID>
screen -X -S <screen_id> quit
What other commands do you use daily… but you keep forgetting?
Happy coding! Keep Innovating!