Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links



GIT cheat sheet

20 September,2023 by Rambler

Compiling a list of GIT commands used regularly in my daily work. Adding more over the next few daysModels



Gitflow - Focus on long lif feature branches and multiple primary branches . More collaboration required - and strict development method. 

Trunk-based development - Developers merge small, regular update to the core - trunk also know as "main branch" . Used in CI\CD




--Clone the repository to the local machine 

git clone


--Check status of file 

--Files marked in red are in the file system, but Git not tracking them yet.

git status

--Track the file 

git add myFilename


-- Commit aka save your file to the  local copy of the project’s Git repository

git commit -m "a commit test"


--show refs

git show-ref

--Show commit history 

git log 

--Display unstaged changes 

git diff 




--Push aka your changes from you up to GitHub

--origin = repository of copy in GitHub 

git push origin <replace_with_branch_name>




--Display branches in the repo

git branch

--Create and check out a new branch named <MyBranch>. Don't use the -b flag for checking out an existing branch. 

git checkout -b <MyBranch>



git config --global http.sslVerify false 



Author: Rambler (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on GIT cheat sheet