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

19 July 2020

git tag



Get all tags from remote repo
$ git fetch --all --tags
List all tags:
$git tag


Checkout tag
$ git checkout tags/_tag-name_ -b __branch-name__

do some changess here... or merge with latest branch
$ git merge branch_with_new_features

Create new tag
$ git tag vX.x

Push to remote Repo
$ git push origin vX.x 





09 June 2016

git branch

ref:  https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell

03 December 2014

git: lokasi asal (remote)

git branch -a
git remote show
git remote show origin

or

cat manifests.git/config 
[core]
        repositoryformatversion = 0
        filemode = true
[remote "origin"]
        url = /usr/local/aosp/mirror/platform/manifest.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "default"]
        remote = origin
        merge = android-4.4.2_r1
[user]
        email = siperdana@gmail.com

18 November 2013

git remote


Nak clone libemu pada github dan cipta branch utk patch utk isu test al, 3d (a8 d3)
  1. Create new repo kat github
  2. clone ke local
  3. git remote add carnivore git://git.carnivore.it/libemu.git
  4. git fetch carnivore
  5. git checkout master (jika bukan dlm branch master)
  6. git merge carnivore/master
  7. git push origin master

05 June 2012

git delete remote

version 1.7.0
git push origin --delete branch

version 1.5.0
git push origin :branch

16 May 2012

git merge dan conflict

Kalau tak nak merge conflict, cuma nak ambil local copy, guna --ours. 
Kalau nak guna remote guna --theirs
git checkout --ours # checkout our local version of all files

Nak diff antara dua branch
git diff master origin/master

Nak merge current branch dengan remotes/origin/master
git merge origin/master


Nak sycn github repository dengan Original(fork dari) Master Repository
git remote add upstream git://github.com/pemula/projek.git
git fetch upstream
git merge upstream/master
#selesaikan conflict, jika ada
git push origin/master 

07 May 2012

github key

cara nak capai github tanpa guna default private key.

tambah pada ~/.ssh/config:

Host gh
        Hostname github.com
        User git
        IdentityFile ~/.ssh/somekey


seterusnya:
$  git clone ssh://gh/username/repo.git