git-branch

Committing documentation to a git branch (gh-pages)

╄→гoц情女王★ 提交于 2019-12-13 19:04:59
问题 I have generated documentation from javadoc in a /docs directory in the working directory of my git project. I would like to make this documentation available at github.io by committing it to the gh-pages branch of my repository (this will make it automatically available at http://username.github.io/projectname ). Not sure how to go about it, though. If I switch to gh-pages by using git checkout , all the contents of my working directory will be switched to the contents of the gh-pages ,

The following untracked working tree files would be overwritten by

筅森魡賤 提交于 2019-12-13 16:29:11
问题 after trying to branch a remote branch to my workplace, I get the following error: **$ git checkout -b canc_el --track origin/canc** error: The following untracked working tree files would be overwritten by checkout: src/iphone/FacebookSDK.framework/Headers src/iphone/FacebookSDK.framework/Resources src/iphone/FacebookSDK.framework/Versions/Current src/iphone/Xcode/Crashlytics.framework/Headers Please move or remove them before you can switch branches. Aborting That's strange. I haven't

how to merge specific files in git

你。 提交于 2019-12-13 11:35:44
问题 Suppose I have a project on MASTER branch with 100s of php files. To do a bug fixing in the project, i create a separate branch git checkout -b bugfix Then after fixing the bug in 3 files (for eg index.php, register.php and login.php), i merge it in the master branch git checkout master git merge bugfix The above code will merge all the 3 files i made changes, but is there anyway that i can force GIT to merge only 2 files, say login.php and register.php only? 回答1: There are two approaches:

GitLab: is there a way to assign a status/comment to a branch?

强颜欢笑 提交于 2019-12-13 07:17:14
问题 I'm planning to use GitLab to manage Git repositories (mainly Linux kernels from various hardware vendors). Currently, I'm using Gitolite to manage users on Git server and MediaWiki to have what a call a "branch table"; in other words, a table where the single users report: branch name (e.g. xboard-feat-i2c2) branch maintainer short branch description (e.g. "started from rev 2.0.0, feature branch to implement i2c2 driver on custom hostboard X") branch status (WIP, testing, ready to merge,

Difference between “checkout” and “checkout -b” when remote exists?

半腔热情 提交于 2019-12-13 05:29:40
问题 If I have a remote branch, I can locally do git checkout MyRemoteBranch and it will work fine. By work fine I mean it will create a local branch called MyRemoteBranch and switch to it, and this local will track the remote. In this case, when do I have to pass the -b parameter? What is the difference between the below when the remote does exist: git checkout MyRemoteBranch Vs git checkout -b MyRemoteBranch 回答1: Caleb's answer is correct (and I've upvoted it) but here it is in more precise

How can I get the latest tag of the form vX.X.X.X?

爷,独闯天下 提交于 2019-12-13 04:42:52
问题 Here is a list of tags I get when I do git describe --tags : v1.1.8 v1.1.9 v1.2.0 v1.2.0.1 v1.2.0.10 v1.2.0.11 v1.2.0.12 If I do git describe --tags `git rev-list --tags --max-count=1` I may get tag with either 3 digit or 4 digit. I only want to pick up the latest 4 digit tag. How can I always get the latest 4 digit git tag? What I mean by the 4 digit tag is anything with vX.X.X.X 回答1: Edit : You write I only want to pick up the latest 4-digit tag. (my emphasis) However, your question really

How to achieve a private branch in git that “floats” when merging with upstream?

左心房为你撑大大i 提交于 2019-12-12 20:26:31
问题 I have a fork of another organization's repository. I'm at the the latest tag in the repo, which is not the head, and I've created a branch from that tag which will never be pushed upstream. That's why I consider the branch private. I've made commits to my private branch and am using that code in my production environment. When a new tag is made to the upstream repository, I want to be able to pull their changes. However, I'd like to always keep my commits in a neat stack on top of their last

How to set up a git development environment when you're testing remotely

我的梦境 提交于 2019-12-12 12:39:54
问题 This may seem like a silly question, but I feel like I understand GIT fairly well, and yet I can't seem to set up my development environment as I would like. I'm either missing something really simple, or I'm going about it all wrong :) I initialized a bare git repo on my server, cloned it to my local machine, committed my files and pushed to origin. Then, locally I created three branches (master, release, develop) and published them all to origin. I intend to have multiple developers pulling

How to move commits in a branch to another new branch in GIT?

廉价感情. 提交于 2019-12-12 11:35:49
问题 I have develop git branch for my work, I created a new branch called feature1 and made commit 1,2,3, and 4. I need to move commit 3,4 from feature1 branch to a new created branch feature2 . The commits 3,4 should be deleted from feature1 and added to a new branch feature2 , so the end result should be something like feature1 with 1, and 2 branches and feature2 with 3 and 4. Please note that at the moment I have develop and feature1 branches. feature2 not added yet. What is the best way to

Search all branches created by a user in a GitHub repository

Deadly 提交于 2019-12-12 10:38:53
问题 There was a branch created by a user ( knownUserName ) in our code repository ( repoEx ). Where he committed and push ed a few of his changes, but he didn't create a pull request for the same. It has been long and there is an exponential increase in the number of branches that the repository now has because of which we are unable to go through all the branches and find the one created by him. Is there a way to search all the branches using the git command line or GitHub interface, to find all