none
flagging code as "ready for production"

    Question

  • Hello,

    I'm wondering if there's a way that we can flag our code (files or sections of code) as ready to be pushed to our test environment or ready to be pushed to our production environment. I ask because we had an incident where all my code was ready to be pushed to production, but I had updated from our repository which happened to contain other people's code that was not ready to be pushed to production. But they got pushed anyway. (luckily it ended up passing testing.) If we had a way of flagging that code as "not ready for production" I wouldn't have to worry about check it, excluding it, commenting out code, whatever I would have to do to ensure it doesn't get pushed to production.
    Monday, April 10, 2017 4:58 PM

All replies

  • Hi gib898,

    Thanks for posting here.

    >>>if there's a way that we can flag our code (files or sections of code) as ready to be pushed to our test environment or ready to be pushed to our production environment.

    Do you use Git as code version control? If yes, we could not flag our code as ready to be pushed, but we could flag our code as not ready to be pushed by skip-worktree.

    git update-index --skip-worktree <file>

    When you want ready to push those code files, you can use no-skip-worktree :

    git update-index --no-skip-worktree <file>

    Besides, for the sections of code, we could only commenting out  sections of code.

    if I not understand you question correctly, please let me for free and you can describe your question more detail. Thanks.

    Hope this can help you.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 11, 2017 7:10 AM