Skip to content

Instantly share code, notes, and snippets.

@nassimhaddad
Last active December 11, 2015 20:39
Show Gist options
  • Save nassimhaddad/70bca77532fefc3a67cb to your computer and use it in GitHub Desktop.
Save nassimhaddad/70bca77532fefc3a67cb to your computer and use it in GitHub Desktop.
Git - needed functions to create a new repository in Rstudio and then uploading it to bitbucket

(source: http://nvie.com/posts/a-successful-git-branching-model/)

create new branch:

git checkout -b develop

you can already use it this way

git remote add origin git push origin develop git pull origin develop

but add this:

git branch -u origin/develop

and now it works in rstudio and with

git pull git push

merge with master

git checkout master git merge --no-ff develop

delete

git branch -d hotfix-1.2.1

# preliminary
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
# load existing git repository to bitbucket
git remote add origin https://[email protected]/haddanas/r_interview_exercises.git
git push -u origin --all # to push changes for the first time
# create a README
echo "# This is my README" >> README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment