Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git push origin main not working

When pushing your code, "main" is the branch name you're pushing to. Check if that's the branch on your github. 
If that doesn't work, you can start from scratch and remove all git instances by running

rm -rf .git

Then start the process all over again and set your branch name to "main" then run "git push origin main"
Comment

git push origin master not working

Possible errors:

1. Origin - you maybe be pushing to the wrong origin.
git set-url origin git@github.com:username/test.git

2. Branch - you may be on the wrong branch. switch to the right branch and then push
git checkout branch

3. Add & Commit - remove to use these commands before pushing
git add .
git commit -m "commit message"
Comment

git push not working

make sure you the branch you are pushing to and  the branch you are in locallly
are the same, {if there is no tracking relationship between the two establish one}
use command git push -u origin <branch>
/if that doesn't work you can do it forcefuylly using 
git push -f origin <branch> 
do a git status to confirm if there are indeed any commits that need to be pushed
do a git push to the origin master again
Comment

git push not working

//1. make sure you are pushing to the right branch (local main) (origin main) || (local master) (origin master)
//2. if it's the first time pushing, delete the readme file on the branch your pushing changes to on the repo on github, add it locally using ( touch RAEDME.md ),
//3. then push or do a git pull origin <branch name>
//4. do a git push -u origin <branch> [the u flag sets a tracking relationship between the two branches, you don't have to specify the branch name in subsequent commits ]
Comment

PREVIOUS NEXT
Code Example
Shell :: bash rename foldr 
Shell :: postgres setup Linux Debian 
Shell :: brave browser install on ubuntu 
Shell :: watch and compile scss command 
Shell :: flutter run all devices 
Shell :: overall configuration gzip compression with nginx 
Shell :: bash load file as array 
Shell :: ionic cordova generate component 
Shell :: copy files out of docker 
Shell :: applescript open new terminal tab 
Shell :: install best torrent app for linux 
Shell :: assign contents of file to variable bash 
Shell :: next upgrade 
Shell :: readme style 
Shell :: git clone in 
Shell :: git push -u rejected 
Shell :: find tomcat location in mac 
Shell :: how to add proxy to your command line linux 
Shell :: enable docker api 
Shell :: kill process unix 
Shell :: alias bash laravel 
Shell :: gcloud check region 
Shell :: View total data received and sent (Linux) 
Shell :: git update gitignore remove files 
Shell :: git search all commits for string 
Shell :: run file linux 
Shell :: brew command not found 
Shell :: npm dotenv 
Shell :: install tar files on linux 
Shell :: git delete branch upstream 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =