In this article, I will explain to you how to work with git and bitbucket. This is a direct practice example for the beginner
Before start this article please read some good tutorial about git so you can understand well.
Download Git https://git-scm.com/download and then install.
No need check anything on the installation process just click next on the whole process.
Create an account at https://bitbucket.org
- git config –global user.name “Name” e.g (git config –global user.name “yuvrajkhavad”)
- git config –global user.email “your email id” e.g (git config –global user.email “email@example.com”)
- Press enter without entering any file name.
- Enter the two-time password then display a newly generated file path. (Note: This password will use for clone project, push project and pull project).
- Open file folder mention in git bash and copy the key from those locations
- Then add a key in Bitbucket
- Log in to Bitbucket.
- Go to View Profile
- Click on SSH keys and then Add key.
- Paste the key into the text box:
- Click Add key. You’re done!
- Then create a new project repository and copy the project URL because we have to use at step 5.1
- cd c: (Note: Move-in C directory)
- cd test/ (Note: Move to a particular folder of your project)
- git clone e. g (git clone firstname.lastname@example.org:zindexsolutions/test.git)
- Then type “Yes”
- Then enter your password
- git status
- git add . / -A e.g (git add .)
- git commit -m “” e.g (git commit -m “First Commit”)
- git pull origin e.g (git push origin master) It will copy files bitbucket to local
- git push origin e.g (git push origin master) It will upload files local to bitbucket account
It’s done. Let me know have any problem happy to help. Just sent mail at email@example.com.