Made a typo or wrong description in a commit message? Run and edit:
git commit --amend
git commit --amend --reuse-message HEAD
#or
> the installed direction of my git | |
$ which git | |
> version of git | |
$ git --version | |
> Ignore list is a file in the base folder | |
.gitignore |
setup name and email
for a specific repository, navigate into it and type
git config user.name "your username"
git config user.email "[email protected]"
note add --global to make it global for new repositories
change your editor for commits
git config --global core.editor "pico"
get the remote repository url
git config core.trustctime false
git core.filemode false
git config user.name "Alice Bob"
git config user.email [email protected]
When using Git Version Control you have quite a few workflow variations. Which one you choose depends on your team and what fits your requirements and usage more appropriately.
Here are some popular options that will be described later in this document:
Step-by-step guide for creating a feature or bugfix branch, submit it for code review as a pull request and once approved, merge upstream. This guide is intended for internal developers with push access to all relevant repos.
You should understand rebasing and squashing. For a very good explanation on rebasing and squashing with pull requests see How to Rebase a Pull Request. Also worth reading is the Hacker's Guide to Git.
git fetch | |
git rebase origin/master | |
#Source: http://stackoverflow.com/questions/7200614/how-to-merge-remote-master-to-local-branch | |
#git merge branchname takes new commits from the branch branchname, and adds them to the current branch. If necessary, it automatically adds a "Merge" commit on top. | |
#git rebase branchname takes new commits from the branch branchname, and inserts them "under" your changes. More precisely, it modifies the history of the current branch such that it is based on the tip of branchname, with any changes you made on top of that. |
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.