Tag: branch

git best practice and avoid cherry picking

I’m rather new to git but start to love it, although I believe I’m not using it correctly. I’ve got 3 branches in one of our projects – dev, staging and pro, corresponding to 3 different servers, for development, staging and production. We’re usually adding new branches for any support and feature tickets our client […]

Railstutorial git branch edit: how do I “fill” the contents of README.md with the contents of Listing 1.13?

Working with RailTutorial.org on section “1.4.4 Branch, edit, commit, merge”, using CLOUD9’s online IDE, I made a new git branch as instructed, and renamed the README.rdoc to README.md in my shell. The tutorial explains that I should “fill README.md with the contents of Listing 1.13” Normally, I would navigate to README.md in the file navigator, […]

Git – Unable to push, unable to pull after commit

I was on the way to commit and push changes. The changes were committed successfully. Then, I was trying to push and it failed. git -c diff.mnemonicprefix=false -c core.quotepath=false push -v –tags origin mpgf:mpgf Pushing to https://github.com/XXXXXXXXX To https://github.com/XXXXXXXXX ! [rejected] mpgf -> mpgf (non-fast-forward) error: failed to push some refs to ‘https://github.com/XXXXXXXXX’ hint: Updates […]

Does cloning a repo by a certain HASH include snapshot of included submodules?

I need help when cloning my github repo with its submodules. I am currently using this generic command : git clone –recursive ${GIT_SOURCE} -b master ${MY_DIR} and it works fine. However, I was wondering if cloning my master branch by HASH will include the submodules “snapshot” (i.e. their own commits corresponding to that particular master […]

git: starting anew on existing repo. Branch or tag for legacy version?

This is a minor issue but I’d like to check people’s thoughts. I have been contracted for a project, they have an existing repo which is outdated. They want to use that repo though to have the new version. This new version will be completely built from scratch. Is it better to create a tag […]

Old git-commits move to new branch

I have the following problem: – I have Master branch and a Dev branch and I recently added another one called TA-17. – I submitted all my commits to this branch merged it with Dev, and closed TA-17 branch. – Then I commited twice something to Dev branch – Now I created a new branch […]

Managing Laravel migrations in Git branches

In my Git repo I have two main branches, master and develop. Then from develop I make more branches when developing new features. Once I am finished with developing I merge develop into master and deploy. In Git I also keep track of my db migrations. Now my issue is I had to make some […]

fetch different branches from git stash using the rest api?

I am currently writing an application that lets you check out files from an atlassian git stash. i want to make it possible to switch between the branches of the repository you want to check out. i need an api endpoint that lets you fetch the branches and one that lets you fetch the files […]

How to extract a subdirectory of one git repository into its own repo, keeping history and all branches?

I have a large repo with a subfolder A that I would like to extract into it’s own repo. I’d like to keep commit history for both the master branch and all (or at least several) release branches. I tried using git filter-branch –prune-empty –subdirectory-filter A, but this seems to only affect the master branch […]

Cannot see any git branches

I cloned a repo from Github. It was an eclipse Android project. I then imported it into Android Studio and have now got it up and running. I ran “git init” and am now trying to create a branch to work off of. when I run git branch I get nothing. Terminal returns nothing and […]

Git Baby is a git and github fan, let's start git clone.