Background
Break News
How to add local font to Tailwind Css and NextJS? - Tutorial Design Pattern? - Blockchain Technology, How to create own Bitcoin virtual currency - Zustand mordern management state - Design Pattern - Flyweight Pattern? - Docker Full training Topic

[Tips] Use Git Commnad to add, commit and push to BitBucket, GitHub

Thursday 13 April 2023
|
Read: Completed in minutes

[Tips] Use Git Commnad to add, commit and push to BitBucket, GitHub

If you a new user on git, you can view it for more experience, you should take a time to read it, I think it will helpful for you when you got a trouble in fix some casual bug when use git command on BitbucketGitHub and (two open big open source project hosting). 

✋✋✋✋✋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

Use Git Commnad to add, commit and push to BitBucket, GitHub and CodePlex





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

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

Command
git 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
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.git
git 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
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

🙇🏼 We Appreciate Your Comments and Suggestions - Webzone - all things Tech Tips web development 🙇🏼
Popular Webzone Tech Tips topic maybe you will be like it - by Webzone Tech Tips - Zidane
As a student, I found Blogspot very useful when I joined in 2014. I have been a developer for years . To give back and share what I learned, I started Webzone, a blog with tech tips. You can also search for tech tips zidane on Google and find my helpful posts. Love you all,

I am glad you visited my blog. I hope you find it useful for learning tech tips and webzone tricks. If you have any technical issues, feel free to browse my posts and see if they can help you solve them. You can also leave a comment or contact me if you need more assistance. Here is my blog address: https://learn-tech-tips.blogspot.com.

My blog where I share my passion for web development, webzone design, and tech tips. You will find tutorials on how to build websites from scratch, using hot trends frameworks like nestjs, nextjs, cakephp, devops, docker, and more. You will also learn how to fix common bugs on development, like a mini stackoverflow. Plus, you will discover how to easily learn programming languages such as PHP (CAKEPHP, LARAVEL), C#, C++, Web(HTML, CSS, javascript), and other useful things like Office (Excel, Photoshop). I hope you enjoy my blog and find it helpful for your projects. :)

Thanks and Best Regards!
Follow me on Tiktok @learntechtips and send me a direct message. I will be happy to chat with you.
Webzone - Zidane (huuvi168@gmail.com)
I'm developer, I like code, I like to learn new technology and want to be friend with people for learn each other
I'm a developer who loves coding, learning new technologies, and making friends with people who share the same passion. I have been a full stack developer since 2015, with more than years of experience in web development.
Copyright @2022(November) Version 1.0.0 - By Webzone, all things Tech Tips for Web Development Zidane
https://learn-tech-tips.blogspot.com