GIT: Javascript .gitignore Template

By PNC No comments

Gitignore template for JavaScript projects COPY THE  CODE BELOW. # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist /tmp /out-tsc # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # nyc test coverage .nyc_output # Grunt […]

Git Fix: “fatal: refusing to merge unrelated histories”

By PNC No comments

The error “fatal: refusing to merge unrelated histories” occurs when two unrelated projects are merged. To fix the error when pulling or pushing updates to local and remote repositories.  Run the command below: git pull origin your_branch –allow-unrelated-histories

GIT: Git Commands Cheat Sheet

By PNC No comments

Commands Cheat Sheet Creating a new branch. git checkout -b YourBranchName Going to an existing branch. git checkout YourBranchName Deleting a local branch. git branch –delete YourBranchName Deleting a remote branch. git push origin –delete YourBranchName To fetch the latest updates from a branch. git pull origin YourBranch To add the latest changes to branch. […]