Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Wednesday, 2 October 2019

Git: Clone a specific tag


Syntax
git clone <repo_url> --branch <tag_name>

For example, gitTaggingDemo repository two tags (https://github.com/harikrishna553/gitTaggingDemo.git).


You can clone v1.1 by executing below command.

$git clone https://github.com/harikrishna553/gitTaggingDemo.git --branch v1.1
Cloning into 'gitTaggingDemo'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 13 (delta 0), reused 13 (delta 0), pack-reused 0
Unpacking objects: 100% (13/13), done.
Note: checking out '2c389dc281395917105cf51f48bcc20c27ba51f4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>


Previous                                                    Next                                                    Home

Sunday, 21 July 2019

git: Get remote branch url

git remote show origin


Previous                                                    Next                                                    Home

git: Delete local branch

git branch -d branch_name
git branch -D branch_name


Previous                                                    Next                                                    Home

git: See all the remote branches

git branch -r


Previous                                                    Next                                                    Home

git: See all the remote and local branches

git branch -a

Previous                                                    Next                                                    Home

git: Update all the local branches

git pull --all
Previous                                                    Next                                                    Home

git : Get all the branches

git fetch --all
Previous                                                    Next                                                    Home

git: Get all the git configurations


'git config --list' command lists all the git configurations in your system

$git config --list
credential.helper=osxkeychain
http.sslverify=false
user.email=hari@abc.com
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f



Previous                                                    Next                                                    Home