Hello,

I would either stash or commit.

Stashing essentially puts away your non-committed changes to a safe
storage. You do a git pull, making the server up to date. When it is done,
just pop your stash.

You can also go with committing. Just git add everything, commit with a
random message. Then do a git pull --rebase. This will get the changes from
the central repo, and put your temporary commit on it.

If you didn't make any changes on the server, both popping the stash and
rebasing your temporary commit will effectively be a no-op, and your
working directory will be clean. If you actually make changes on the
server, you will have those modifications as uncommitted file changes (with
stashing) or as a small commit with your temporary message (with
commit+rebase).

Best,
Gergely

On Aug 4, 2016 17:11, "Ed Greenberg" <greenberg...@gmail.com> wrote:

> I posted this to the git mailing list, but it's a beginner question, so I
> think it's better posted here.
>
> Hi, Thanks for reading my question.
>
> I have two copies of code checked out at the same branch. Desktop and
> remote server.
>
> I use an IDE that automatically SFTP transfers each save from the desktop
> to the remote server, so I can run my changes on the server environment.
>
> At the end of the session, I commit the code on my desktop, do a git push
> to the repo.
>
> When I look at the server, the code there is identical to what's on my
> desktop box and what I just comitted and pushed, but, of course, git status
> thinks it's all modified and wants me to either commit it or stash it.  In
> fact, doing a git log on the server doesn't show my latest push.  So I need
> to pull the changes, but I can't because I have pending stuff.
>
> What's a good git workflow for this save-upload-remote test cycle?
>
> Thanks,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to