Monday, May 13, 2013

About git information

@Add remote git server URL
git fetch origin
git reset --hard origin/master
 
@Download new version from remote(you need to command the fetch)
git checkout HEAD

@Delete tags in remote.
git push origin :tags/{tag name}

@Upload remote
git push origin v1.5
git push origin --tags

@Delete tags in local
git tag -d {tag name}

@Create a tag
git tag v1.0
@Up load a tag to remote
git push --tags

@Show the commit id
git rev-parse [Tag Name]

@Delete Tag
git tag -d [Tag Name]

@Order a commit
git add *
git commit -m "This is the first commit"
git push

@DownLoad all branch from remote
git fetch origin

@
1.$ vim ./.git/config
2.[branch "master"]
        remote = origin
        merge = refs/heads/master
@a good thing to put this bellow into the config file
[alias]
        hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
[color]
        ui = true

No comments:

Post a Comment