npm git private repo auth

Our enterprise Github recently made a change so all anonymous access from work laptop are blocked. This causes problem as we have some private repo dependencies in our package.json like below: dependencies { … “sun”: “git+https://github.kdc.capitalone.com/NeX/sun-ng2-nex.git”, … } Whenever I try to do npm install, it gives me authentication error. I can get it installed…

git pull fetch merge

Difference In the simplest terms, git pull does a git fetch followed by a git merge. You can do a git fetch at any time to update your remote-tracking branches under refs/remotes/<remote>/. This operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I…

git command line commit

Git has a “staging area” where files need to be added before being committed, you can read an explanation of it here. So if you make some change and commit directly, you get some message like: no changes added to commit (use “git add” and/or “git commit -a”) preview Before you add, you could have…

add google code as a remote in git for intellij

add remote for intellij I use intellij to create a local git repo. To add a new remote: 1. create a project in google code. 2. go to this link: https://code.google.com/hosting/settings. Copy the machine code.google.com login xxxxx@gmail.com password xxxxxxxxx  to the user directory’s .netrc file: ~/.netrc then change the priv for this file, could be 500/600, i…

Merge local git repo with the openshift one

Openshift has its own git repo for building/deploying app, so we do not want to push twice and maintain 2 local repo for project. the approach to choose here is to clone your other git repo (ex. on bitbucket) to your local machine: git clone <bitbucket-repo-url> Your local clone has then your other repo (bitbucket…

git http proxy

Have to use proxy to check out code from github since I am in the company’s network. The way is: // Set proxy for git globally git config –global http.proxy http://proxy:8080 // To check the proxy settings git config –get http.proxy // Just in case you need to you can also revoke the proxy settings…

Git vs SVN

The key difference is that it is decentralized. Imagine you are a developer on the road, you develop on your laptop and you want to have source control so that you can go back 3 hours. SVN has the advantage that it’s MUCH simpler to learn: There is your repository, all changes to towards it,…