Git - Stash Saves Time π
The command git stash , picks All the changes in staging and save it in a separate place. Thus, this useful and aptly named command clears your staging area. π₯
That way you can save a set of changes you have made but do not yet want to commit. π₯
Or, if you would need to stash untracked changes as well, use -u argument: π‘
In particular, I use more stash when I need to git pull and want to avoid conflicts between local changes and changes upstream.
Β―\_(γ)_/Β―
To restore your local changes back to staging, you need to apply your stash. The following command recreates the latest changes that were stashed away: βοΈ
You can have more than one stash. By default, your stashes will be applied in FILO (First-in, last-out) order.
#git #vcs #stash
@ProgrammingTip
The command git stash , picks All the changes in staging and save it in a separate place. Thus, this useful and aptly named command clears your staging area. π₯
That way you can save a set of changes you have made but do not yet want to commit. π₯
$ git stash
Or, if you would need to stash untracked changes as well, use -u argument: π‘
$ git stash -u
In particular, I use more stash when I need to git pull and want to avoid conflicts between local changes and changes upstream.
Β―\_(γ)_/Β―
To restore your local changes back to staging, you need to apply your stash. The following command recreates the latest changes that were stashed away: βοΈ
$ git stash apply
You can have more than one stash. By default, your stashes will be applied in FILO (First-in, last-out) order.
#git #vcs #stash
@ProgrammingTip
Git - Differences Between Commits ππ»
To see the changes of the last commit, you can use:
This command will show the files and the number of lines added and removed by file in each commit. π
To see what exactly was changed in a commit, use git diff. π₯
To see the difference between two commits using sha s of commits in hand (0da94be and 59ff30c), use:
#git #commit
@ProgrammingTip
To see the changes of the last commit, you can use:
$ git log βstat
This command will show the files and the number of lines added and removed by file in each commit. π
To see what exactly was changed in a commit, use git diff. π₯
To see the difference between two commits using sha s of commits in hand (0da94be and 59ff30c), use:
$ git diff 0da94be 59ff30c
#git #commit
@ProgrammingTip
Gitignore β¨
Create useful .gitignore files for your project. π€π»
Tell gitignore.io about your operating system, development environment and programming language of choice, and itβll generate a .gitignore file. πΎ
https://t.me/pgimg/22
[ Website ] : gitignore.io
γ°γ°γ°γ°γ°γ°
#Git #Gitignore
@ProgrammingTip
Create useful .gitignore files for your project. π€π»
Tell gitignore.io about your operating system, development environment and programming language of choice, and itβll generate a .gitignore file. πΎ
https://t.me/pgimg/22
[ Website ] : gitignore.io
γ°γ°γ°γ°γ°γ°
#Git #Gitignore
@ProgrammingTip
Telegram
Programming Tips Resources
Axosoft GitKraken: Unleash Your Repo! π
The legendary Git GUI client for Windows, Mac and Linux. π§
Axosoft GitKraken is a Git client with efficiency, elegance and reliability at the core. It was made for devs by devs. π€
Features
You can do all the standard things you should be able to do with a git client; branching, merging, pulling, pushing, reverting, etc. β¨
The range of options you have for each commit π₯
πΉ Set Upsteam
πΈ Branch from a historic commit
πΉ Cherrypick from commit
πΈ Revert the commit
πΉ Edit the commit message
πΈ Deleting the commit (and remote versions of it)
πΉ Creating a tag from a commit
https://t.me/pgimg/66
[Website] : https://gitkraken.com
γ°γ°γ°γ°γ°γ°
#Git #VCS
@ProgrammingTip
The legendary Git GUI client for Windows, Mac and Linux. π§
Axosoft GitKraken is a Git client with efficiency, elegance and reliability at the core. It was made for devs by devs. π€
Features
You can do all the standard things you should be able to do with a git client; branching, merging, pulling, pushing, reverting, etc. β¨
The range of options you have for each commit π₯
πΉ Set Upsteam
πΈ Branch from a historic commit
πΉ Cherrypick from commit
πΈ Revert the commit
πΉ Edit the commit message
πΈ Deleting the commit (and remote versions of it)
πΉ Creating a tag from a commit
https://t.me/pgimg/66
[Website] : https://gitkraken.com
γ°γ°γ°γ°γ°γ°
#Git #VCS
@ProgrammingTip
Telegram
Programming Tips Resources
Never commit code thatβs been commented out π«
Iβve never understood the reasoning behind committing code thatβs been commented out. π€
I assume itβs to keep old versions of the code around just in case the new code doesnβt work, but thatβs just bizarre. β οΈ
Keeping track of old versions is the reason we use a version control system in the first placeβοΈ
Why was the code commented outβ
Does it workβ
Should it workβ
Has it ever workedβ
Is it something we should strive towards or run away fromβ
Code thatβs been commented out is worse than useless, because every time itβs read, it raises questions like these without providing any answers. β
It only serves to confuse and distract from the code in use. π€―
https://t.me/pgimg/134
γ°γ°γ°γ°γ°γ°
#Tips #Git
@ProgrammingTip
Iβve never understood the reasoning behind committing code thatβs been commented out. π€
I assume itβs to keep old versions of the code around just in case the new code doesnβt work, but thatβs just bizarre. β οΈ
Keeping track of old versions is the reason we use a version control system in the first placeβοΈ
Why was the code commented outβ
Does it workβ
Should it workβ
Has it ever workedβ
Is it something we should strive towards or run away fromβ
Code thatβs been commented out is worse than useless, because every time itβs read, it raises questions like these without providing any answers. β
It only serves to confuse and distract from the code in use. π€―
https://t.me/pgimg/134
γ°γ°γ°γ°γ°γ°
#Tips #Git
@ProgrammingTip
Telegram
Programming Tips Resources
Oh shit, gitβοΈ
Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. π€·π»ββοΈ
Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem. π€¦π»ββοΈ
So here are some bad situations I've gotten myself into, and how I eventually got myself out of them in plain english*. β
[ Website ] : ohshitgit.com
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Git #SourceControl
@ProgrammingTip
Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. π€·π»ββοΈ
Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem. π€¦π»ββοΈ
So here are some bad situations I've gotten myself into, and how I eventually got myself out of them in plain english*. β
[ Website ] : ohshitgit.com
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Git #SourceControl
@ProgrammingTip
Telegram
Programming Tips Resources
The guide to Git I never had π―
Understanding Git is crucial for any developer. Often overlooked in CVs, mastering Git's capabilities enhances your coding proficiency significantly. This guide covers everything from basic commands to advanced techniques, ensuring you can manage and track your code effectively. βοΈ
In this comprehensive guide, we delve into branches, commits, merging, rebasing, and more to help you master this essential tool. β‘οΈ
[ Article ]: https://medium.com/@jake.page91/the-guide-to-git-i-never-had-a89048d4703a
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Git #VersionControl
@ProgrammingTip
Understanding Git is crucial for any developer. Often overlooked in CVs, mastering Git's capabilities enhances your coding proficiency significantly. This guide covers everything from basic commands to advanced techniques, ensuring you can manage and track your code effectively. βοΈ
In this comprehensive guide, we delve into branches, commits, merging, rebasing, and more to help you master this essential tool. β‘οΈ
[ Article ]: https://medium.com/@jake.page91/the-guide-to-git-i-never-had-a89048d4703a
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
#Git #VersionControl
@ProgrammingTip
Telegram
Programming Tips Resources