Category: GIT

Setting the username and email for your GIT Repo

Use the following code to set the default username for your git repo git config –global user.name “jfernandez” and the following to check: git config –global user.name Use the following code to set the default email for your git repo git config –global user.email “hello@toffy.com.au” and the following to check:…

Read More

GIT Amend Previous Commit

Using this command will let you amend your very last commit:

Read More

Adding SSH Keys in GIT to pair up BitBucket Repositorys

It was getting a bit frustrating doing GIT Pulls and entering the BitBucket password every single time. So using an SSH key became a lot more convenient. Use the following steps to establish a connection with a repo using an SSH key:

Read More

Branch on ‘Origin/master’ has diverged from local branch

if you have revered a commit and want the remote branch to reflect your revert + latest commits use this bit of code git push -f origin master Note that this will reset your remote (origin) master to reflect changes in your local master. Use with caution!

Read More

What is your current GIT Remote ?

To identify your current GIT remote just use: git remote -v

Read More

GIT Problem / Error : ‘please enter a commit message to explain why this merge is necessary …’

To handle the following problem use the following steps. press “i” write your merge message press “esc” write “:wq” then press enter

Read More

Create a new remote URL origin

Use the following code to add a new remote URL origin for your repository.

Read More

Check git Version

To get the version of git you are running use:

Read More

Undo GIT Add

If you would like to un-stage a file that you have just added in git simply use this command.

Read More

GIT Ignore file with specific extension

If you want to ignore a file with a specific extension that is not essential to your project simply add it to the .gitignore file.

Read More
© Toffy digital 2017 Powered by Toffy Digital