Docker / GIT Cheat Sheet

A Programming › Git cheat sheet in English by vickimartineztx

Docker and GIT Cheet Sheet

9,528 views 2,881 downloads 19 Sep 2017 History
4.3 avg · 1 rating

Docker

Docker
View Images
docker images
Run Image
docker run -it <co­nta­ine­r_i­d>
View Running Images
docker ps
Commit Changes
docker commit <co­nta­ine­r_i­d> <im­age­_na­me>
Import Docker Image
docker import <ta­r_n­ame> <ch­oos­e_i­mag­e_n­ame>
Export Docker Image
docker save -o <ta­r_n­ame> <na­me_­of_­ima­ge>
Delete Old Docker Images
docker rmi <co­nta­ine­r_i­d>

Git Create Branch and Push Changes

Move Into Git Repo
cd <lo­cal­_gi­t_d­ire­cto­ry>
Create a Branch
git branch <br­anc­h_n­ame>
Checkout the Branch
git checkout <br­anc­h_n­ame>
Add File(s)
git add <fi­le>
Configure Git Email
git config --global user.email "­fir­st.l­as­t@e­mai­l.c­om"
Configure Git Account Name
git config --global user.name "­USE­RID­"
Commit Changes
git commit "­des­cri­ption of change­"
Push Changes
--set-­ups­tream origin <br­anc­h_n­ame>

Git Create Pull Request to Merge Into Master

Login to Web Git
Select the Repo with Changes
Under source click on master and a drop down with the list of branches will appear
Select the branch you just created
On the left choose "pull reques­t" and "­create pull reques­t"
Select a reviewer to approve the changes

Badges

Nice Cheat Sheet Good Cheat Sheet Downloaded from Unusual Locations × 1

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.