Logo
BEAUTY IN SIMPLE

Digital Garden

A collection of short solutions to daily tech problems, notes, some thoughts and explorations that might convert into a blog post someday. My take on Learn in public concept.

Git

  1. Merge dev branch into master
  2. Create one repository with folders of different projects
  3. Change commit message of the last commit

Merge dev branch into master

  • On dev branch

    git merge master
    - to solve merge conflicts if any
  • Checkout to master branch

git checkout master
  • Merge dev branch into master branch
git merge --no-ff dev
  • Push master branch
git push origin master
  • Delete merged branch
git branch -d dev
  • Delete merged branch on remote host
git push origin :dev

Create one repository with folders of different projects

  1. Create github repository with readme file

  2. Clone it

    git clone <repo_url>
  3. Unzip cloned folder

  4. Copy folder with project into this folder

  5. From root folder add all files to git

    git add .
  6. Commit changes

    git commit -m “message”
  7. Push changes

    git push origin master

To add another folder repeat from 4th step.


Change commit message of the last commit

git commit --amend -m "your new message"