Making Changes and Push
Every project needs a README file. Your README appears on the project Overview page and introduces your project.
echo "# This is my README" >> README.md
git add README.md
git commit -m "First commit. Adding a README."
git push -u bitbutket master
Related cards:
Create local repository and push to remote
Create Local Repository
- Download GitHub for Windows or use something similar, which includes a shell
- Launch Git Shell
- In the shell, navigate to the directory with
cd
-
git init
to create a local repository
...
Deprecated - How to Remove Unwanted Files Before Merging an Upstream Branch to Master and Staging
Deprecated method. Use this instead. See also [this](https://makandracards.com/kiat_git/485037-how-to-r...
How to create new repo on existing code and link to remote
I wrote some code in some files in a folder called AA. I have a repo in remote in Bitbucket. Here're the steps to link my local to remote using TortoiseGit:
- Create a repo for the folder AA: Navigate to the folder in windows explorer and ri...
Staging and Committing
A separate staging step in git is in line with the philosophy of getting out of the way until you need to deal with source control. You can continue to make changes to your working directory, and then at the point you want to interact with source ...
How to check compare changes on a topic branch to master
If I want to compare changes on a topic branch to master, I find it easiest and safest to do the following:
git checkout master
git checkout -b trial_merge
git merge topic_branch
After completing the merge, it is easy to see the cons...
How to Contribute to Open Source Project in GitHub
We use a process called pull request, or PR for short, to contribute to open source.
Prerequisites
We need a fork repo in our GitHub account and in our local machine. See this [guide](https://makandracards.com/kiat_git/68235-how-to-update-a-...
How to Update a Forked Repository from Upstream
Scenario
2 to 3 remote repositories in GitHub and 2 local repositories:
- [GitHub] Go to an owner repository (eg OpenMage).
- [GitHub] Fork owner's repository (from item 1).
- [GitHub or BitBucket] Our application with custom code.
- [Loca...
When things go wrong, revert to earlier commit
When things go wrong, for example, caused by a bad commit, we need to revert back to an earlier known good commit. To identify the commit to revert to, read the commit graph carefully, pay close attention to the dots on the lines. The commit to re...
How to migrate to Magento LTS with git with combined histories
Scenario
Magento 1 is end of life. I want to migrate an existing Mage repo to the latest from Magento - Long Term Support maintained by OpenMage .
Warning: the follow...
Using Bitbucket for Automated Deployments
See also:
- http://jonathannicol.com/blog/2013/11/19/automated-git-deployments-from-bitbucket/
- http://symmetrycode.com/super-easy-deployment-with-git-and-bitbucket/
Bitbucket provides git hooks that can be used for code deployment. Code deploy...