Setting git on a production server

To set your git repo on your production server. go tho the root directory of the server (i.e. public_html or httpdocs etc.) then run: git init run (to connect your server with the cloud repo) git remote add origin https://PATH_TO_YOUR_REPO Then if you want your production server to always pull from the remote origin …


Bitbucket – set remote for a repo

Step 1: Switch to your repository’s directory cd /path/to/your/repo Step 2: Connect your existing repository to Bitbucket git remote add origin https://PATH_TO_YOUR_REPO git push -u origin master


Git – Remove unsaved changes

To remove all changes you made ¬†and “reset” to the last commit # Revert changes to modified files. git reset –hard # Remove all untracked files and directories. (`-f` is `force`, `-d` is `remove directories`) git clean -fd


Git Error – invalid active developer path (also called, did you upgraded to macOS Sierra?)

  If you are getting this error, ¬†error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun This is because you are on a Mac, and you upgraded to macOS Sierra. To fix this, all you need to do is update/install Xcode. run this command in the terminal:   xcode-select –install Run the command, …


Git – General Notes and Basic commands

# Starting git on a folder git init # Starting BitBucket repo # It’s Pretty much the same process for any other git service like GitHub. BTW, the main difference between GitHub and BitBucket services is that in Github it’s free to create public reops, and in BitBucket it’s free to create private repos. …


Making .gitignore to take effect (gitignore is not working)

When you add/modify the .gitignore file and then try to commit the changes, you will see that the files you asked git to ignore are still on the HEAD, they are still there, this is because you need to tell git to remove them from the index. The way to “fix” .gitignore file is …