git-pull

How do I add/upgrade/downgrade a remote Git project in my repository without using submodules?

不想你离开。 提交于 2019-11-28 08:45:22
I need to keep a copy of WordPress in my project's Git repository. I want to use Git to pull down WordPress updates from GitHub, and then push out those updates via git push and/or git svn dcommit . I currently have a solution in place using Git submodules, and it works; but now I need to deploy my newest project to a server that only supports SVN, and to which I have no direct access whatsoever. Therefore, submodules are out. I've done a ton of reading on Git's subtree merging strategy , and I think it's the right solution; but everything I've read expects that I'd want to follow a remote

Pulling just one directory out of a git repo

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 07:47:24
I have a git repo that I want to do a pull from. I do a normal git pull with no problems. The issue is that I want just one certain directory out of the repo. My thinking was that I could use a .gitignore file with a rule like this: #Ignore all files / #Except the one I want !/temp The problem is this doesn't work. Is that the right way to do it or is there a better way? git pull fetches and merges the remote branch. .gitignore works only locally, and will hide matching entries from showing up on git status and being added to the index with git add . It's not what you want. What you want to do

Git merge flattening

五迷三道 提交于 2019-11-28 04:39:44
If I am working in multiple branches on a single feature, I use git pull branch1 branch2 branch3 to pull all the changes into my master branch. However, all the commit logs of each branch are copied as well. How do I flatten the commit log down to a single message? Pat Notz You can use interactive rebase and "squash" the commits -- see also the Git Ready Tutorial on squashing via rebase . Sorry to just dump a link on you but that's a pretty thorough tutorial. Oh, and this will also squash away your merges just fine. "git merge --squash" (after "git fetch"; "git pull" is just fetch+merge,

How do I check the date and time of the latest `git pull` that was executed?

狂风中的少年 提交于 2019-11-28 04:36:29
How do I check the date and time of the latest git pull that was executed? I frequently need to know when the code changed on a server when something goes wrong. The git show command shows the date of the most recent commit. This isn't the date at which the commit was pulled to the local repository, but Git doesn't keep such pull information. You may be able to find the time of the last pull using the ctime (creation time) of the files on the server. For example: ls -lct shows the ctime of each file, sorted with the most recent first. stat -c %Y .git/FETCH_HEAD Will give you a unix timestamp

How can I pull an existing heroku app to new location for development?

孤街醉人 提交于 2019-11-28 02:52:40
I currently have the latest version of my code on another computer that I want to develop from (Home computer and laptop for when I'm out and about) I set up heroku for my app on my laptop. Now I need to associate my code on my desktop so that I can push to heroku from there as well. This is what I get from my desktop: desktop:~/NetBeansProjects/onlinescheduler$ git pull heroku master fatal: 'heroku' does not appear to be a git repository fatal: The remote end hung up unexpectedly I can't do heroku create because that will create a separate app. How do I associated the existing code with (or

You asked me to pull without telling me which branch you want to merge with

徘徊边缘 提交于 2019-11-28 02:47:22
TL;DR: I have a "tracked" branch that I can't pull. So here I am in "bucket-4": $ git branch -v bucket-1 410f7b5 * gh-53 * gh-48 * "Share App" bucket-2 7ed70a2 * upgrade to SOLR 3.3.0 bucket-3 400ffe4 * emergency fix prod issue * bucket-4 64c2414 Merge branch 'bucket-3' into bucket-4 master 8dc4854 [ahead 1] * gh-73 I'd like to pull in changes from my remote: $ git pull You asked me to pull without telling me which branch you want to merge with, and 'branch.bucket-4.merge' in your configuration file does not tell me, either. Please specify which branch you want to use on the command line and

Detail change after Git pull

拈花ヽ惹草 提交于 2019-11-28 02:39:39
After a Git pull, its output gives a summary on the change amount. How can I see each or some of the files detailed changes? Okay, here is my question to Jefromi: How do I know if I was pulling to master? All I did is "git pull". What does master point to and what is the difference between master and HEAD, the two default heads of Git? How do I see the detailed change in a specific file? How do I see the change in the summary output by the last git pull again? What's difference between git diff and git whatchanged ? Cascabel Suppose you're pulling to master. You can refer to the previous

Resolve conflicts using remote changes when pulling from Git remote

我是研究僧i 提交于 2019-11-28 02:31:43
I'm trying to pull code from my GitHub repo onto my server, but the pull keeps failing because of merge conflicts. I don't want to keep any of the changes that may have occurred on my local server since the last pull. So is there a way I can force Git to overwrite with whatever version is in GitHub, rather than bother me about conflicts? Cascabel If you truly want to discard the commits you've made locally, i.e. never have them in the history again, you're not asking how to pull - pull means merge, and you don't need to merge. All you need do is this: # fetch from the default remote, origin

Git Pull While Ignoring Local Changes?

最后都变了- 提交于 2019-11-28 02:30:57
Is there a way to do a git pull that ignores any local file changes without blowing the directory away and having to perform a git clone ? If you mean you want the pull to overwrite local changes, doing the merge as if the working tree were clean, well, clean the working tree: git reset --hard git pull If there are untracked local files you could use git clean to remove them. Use git clean -f to remove untracked files, -df to remove untracked files and directories, and -xdf to remove untracked or ignored files or directories. If on the other hand you want to keep the local modifications

pull-only repo's 'git status' saying the branch is ahead of origin/master. Why?

走远了吗. 提交于 2019-11-27 23:53:25
问题 So here's the situation: $ git status # On branch master # Your branch is ahead of 'origin/master' by [x] commits. # There are several questions about this on SO already, but none seem to specifically address the type of scenario I have. This answer to one of the questions comes closest, but doesn't go into detail. I'll just quote it verbatim: If you get this message after doing a "git pull remote branch", try following it up with a "git fetch". Fetch seems to update the local representation