Git Initialization in a Existing Project

Goto to Project directory through the command:  cd drag&drop/your/project/folder/here
Initialize git: git init
Make staging: git add .
Commit : git commit -m "your message"

Create a repository on Bitbucket and then connect the repository with your local project –

git remote add origin https://[email protected]/shamimmia/myprojcet.git

git push -u origin master

Check your repository source code on Bitbucket, your project code should be available there.
Done for the first time.

# Git Tag: If you want to add an annotated(-a) version tag to the last commit, follow the command below ( change the version tag “v1.0” and tag message “version 1.0” as you need ) –

git tag -a v1.0 -m 'version 1.0'

Or, To add light tag without tag message –

git tag v1.0

Share the added tag to the remote server –

git push origin v1.0

See the commit details git tag –

git show v1.0

Git tag list –

git tag -l

Git tag delete –

git push --delete origin tagName

git tag -d tagName

Thank you 😉

Leave a Comment

Your email address will not be published. Required fields are marked *