Posts

Showing posts with the label Git

Instruct GIT not to track a specific file

In scenarios like you have a configuration file in  a remote repo for the production environment, and you don’t want to commit the changes to this configuration file made from local.  How do you instruct git to do not track the local changes? --skip-worktree is what you need. git update-index --skip-worktree <filepath/file_name> After index update git won't show you the file in working tree. If you want to track the changes update-index as  git update-index --no-skip-worktree <filepath/file_name>

Git Workflow- The picture speaks for itself

Image

Git SSL certificate problem: self signed certificate [Solution]

git clone https://......./data.git throws ssl error resembling to following: Cloning into 'data'... fatal: unable to access 'https://*/data.git/': SSL certificate problem: self signed certificate in certifica                                                       te chain Solution - disable sslVerify and clone it git -c http.sslVerify=false clone https://......./data.git

Prevent local branch overwrite - Git pull origin

Reset your local  master  to match the remote repository's  master  (WARNING: be sure that you don't have any uncommitted changes you want to keep before issuing the following command): git reset --hard origin/master Fetch all remote branches into your local repository: git fetch origin Create a new local  vsup12  branch from the remote  vsup12  branch, and switch to this new local branch: git checkout -b vsup12 origin/vsup12 Source