Git Repo, push from linux server

To push an existing Project directory to Git Repository, follow below steps –

1. Create a project on your Git account, for example lets say we created Project name KST-project1.
2. Now go to your linux/mac/windows VM or machine or laptop
3. cd into your development project directory, for example I have developed a php project name kst_market -
cd kst_market
4. Now run below commands -
sudo git init
git add .
sudo git add .

sudo git commit -m 'KST Market HTML/PHP/React Code 02042021'

sudo git remote add origin

git remote -v
sudo git remote -v
sudo git push origin master

thats all, enjoy :)
Sync Changes from Server To GIT Repo -
--To View the remote Repor
git remote -v

-- To check the updates
git diff
-- Add changes to local repo
git add .
-- commit to make ready to push/sync to git repo
git commit -m "BL HTML landing page added and profile changes"
-- Sync code changes to master branch on Git
git push origin master

Leave a Reply

error: Content is protected !!