Tag: git
-
GIT Adding TAG Into Repository
Add tag with comment. git tag -a v0.0.8 -m “3rd Beta release.”
-
Git Add New Remote Repository
To add a new repository # abcd is the remote name given can be anything # https://github.com/user/repo.git is any repository url $ git remote add abcd https://github.com/user/repo.git # See all remotes $ git remote show # Verify remotes $ git remote -v
-
Git Create A New Branch Via Commit No/Hash
Creating a new branch by a commit no git branch branchname <sha1-of-commit>
-
Git Pull Specific Commit Via Commit No
In a empty folder. git clone <repository_address> git remote add origin <repository_address> #YOUR_SHA_HERE is like 12eb5133eda7fcf8b86a6cc70a0f8c3afc178263 git fetch origin master YOUR_SHA_HERE git checkout YOUR_SHA_HERE
-
Git Clone With Specific Branch
Cloning specific branch in repository. Example 1 git init git remote add -t refspec remotename host:/dir.git git fetch Example 2 git clone -b my-branch git@github.com:user/myproject.git
-
Git Submodule Adding To Existing Git Project
Tidy way of adding 3rd part frameworks in your project is; First, go into project folder clon the 3rd part frameworks in this with git command below. It will create a Frameworks folder and sub folder for the desired repository. #example below for adding SwiftyJSON git submodule add https://github.com/SwiftyJSON/SwiftyJSON.git Frameworks/SwiftyJSON #example below for adding Alamofire git…
-
Update An Already Forked Branch
For updating a forked branch on Github or any other git related system. First you need to clone your forked branch on your local machine because there is no any one click updater solution.
-
Git Merge Branch Into Master
Merge branch name “test” into master git checkout master git pull origin master git merge test git push origin master
-
Git Push Local File By Overwrite
Some times we just need to push what we have on dev folder and overwrite all on server repository. This terminal command is doing that. git push origin master –force
-
Clone Git Repository Into Non Empty Folder
This can be done by cloning to a new directory, then moving the .git directory into your existing directory. If your existing directory is named “code”. git clone https://myrepo.com/git.git temp mv temp/.git code/.git rm -rf temp
-
GIT: Clone From Private Git Repository Example
A terminal command example for Git clone from private git repository. $ git clone username@domain.com:/home/username/repo_hub.git repo
-
Setting .git Repository on Private Server With One Go Shell Script
First, set your details in global config. git config –global user.name “Trevor D.B.” I’ve found this very useful. Basically it create production and hub repository on the server.