✋✋✋✋✋Morning everyone, welcome back to Learn Tech Tips blogspot, I am Zidane.
On this topic we will help you have an overview about knowledge and experience so you can achieve it after read this topic.
Otherwise you a experience user on git. you also should check it out, maybe you will have another better solution than this topic, welcome you can share it too π
Ok Let's go now
Explore My Other Channel for More Cool and Valuable Insights
π Youtube Learn Tech Tipsπ Tiktok
π Facebook:The basic command for add, commit, push code to Server with below information.
Enter the base folder wanna to add, commit and push to server
git clone ssh://domain.com/name.git
[Error 1] When you got this error
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://bitbucker.com/project.git'
π·How to fix
Command
git commit -am "Updates new files to server"
git push -u origin master
git config --list --local | grep user
user.name=YOUR NAME
user.email=
Command:
git clone -b <branch> <remote_repo>
cd website
git add .
git commit -am "Updates new files to server"
git push -u origin master
The Problem one: git clone, git push, git commit
Commandgit clone ssh://domain.com/name.git
Example:
ssh -o PasswordAUthentication=yes name@domain.com
[Error 1] When you got this error
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://bitbucker.com/project.git'
π·How to fix
git add --all :/ ----- add all file and folder to server
git commit -am 'message'
git push -u origin master
The Problem two: git commit, git push
Command
git commit -am "Updates new files to server"
git push -u origin master
[Error 2] when you got this error
$ git commit
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
π·How to fix
Review
git config --list --global | grep user
user.name=YOUR NAME
user.email=YOUR@EMAIL
$ git commit
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
π·How to fix
git config --global user.email "you@example.com"
Review
git config --list --global | grep user
user.name=YOUR NAME
user.email=YOUR@EMAIL
git config --list --local | grep user
user.name=YOUR NAME
user.email=
The Problem three: git clone
Command:
git clone -b <branch> <remote_repo>
git clone https://bitbucket.org/your_username/your_application_name.gitgit clone -b staging https://bitbucket.org/your_username/your_application_name.git
[Error 3]
// if you get HTTP error, so you can use
// use this when clone much capacity data (for compression data on the server)
π·How to fix
Thanks for
// if you get HTTP error, so you can use
// use this when clone much capacity data (for compression data on the server)
π·How to fix
git config --global http.postBuffer 524288000 git config --global --add core.compression -1 -- or git clone https://bitbucket.org/your_username/your_application_name.git
Thanks for
Ref Link: https://stackoverflow.com/questions/1911109/clone-a-specific-git-branch
Thanks for reading Use git command to add, commit and push to bitbucket, Github
Any question or feedback, you can leave your comment here so we can discuss about it!
Zidane
Thanks for reading Use git command to add, commit and push to bitbucket, Github
Any question or feedback, you can leave your comment here so we can discuss about it!
Zidane