cheatsheets's People
cheatsheets's Issues
Add revert
Revert
- adds revert commit reverting a given commit
Example
- revert last two commits:
git revert HEAD~2..HEAD
- revert commits A..B (inclusive):
git revert A^..B
- revert given commit:
git revert <HASH>
Resources
Add new page - advanced features
Add new page with advanced features
Add squash
Squash
- merges multiple commits into one
Examples
Squash two last commits into one
- Rebase interactively last two commits
git rebase --interactive HEAD~2
- Edit the file
- from
pick <commit_1> <commit_message_1> pick <commit_2> <commit_message_2>
- to
pick <commit_1> <commit_message_1> squash <commit_2> <commit_message_2>
- Change the resulting commit message
Resources
Create BASH script cheatsheet
- argument parsing
- functions
- IF statements
- cycles
Create UNIX tools cheatsheet
- less commands
- grep usage
- awk?
- find files with name/containing string
Select custom text editor
git config --global core.editor gedit
Add cherry-pick
Cherry pick
- applies commit to the current branch
- can also apply a range of commits
Example
- let's say we have commits
A
,B
,C
,D
,E
, all fixing a particular issue - we want them in a different branch (e.g. apply bug-fix to both production and development)
- use
git cherry-pick A^...E
- should we use it without the
^
, the range would be exclusive (withoutA
)
Resources
Add credential cache
Cache credentials
- caches credentials so that you don't have to type them for every pull/push
Usage
git config [--global] credential.helper store
Timeout
- set cache timeout (in example for 2 hours)
git config --global credential.helper 'cache --timeout 7200'
Resources
Add this handy command for removing tracked files that should be in gitignore
https://stackoverflow.com/a/33519356/6835824
This can be sometimes very helpful.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.